/**
 * AllPlanner — wp-login.php Custom Branding
 * Applied to: login, lostpassword, resetpass, register
 * Loaded via: login_enqueue_scripts hook in functions.php
 *
 * css-standards.md 준수: `!important` 0개 — specificity(`body.login.wp-core-ui`)로 오버라이드.
 */

/* === Body === */
body.login {
    background: #f8f9fa;
    font-family: 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* === Logo: Replace WP logo with T2W branding === */
body.login h1 a {
    background-image: none;
    width: auto;
    height: auto;
    text-indent: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.03em;
    padding-bottom: 16px;
}

body.login h1 a::before {
    content: '';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #FFB700;
    border-radius: 9999px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='22' height='22'%3E%3Cpath fill='%23fff' d='M19.3,16.9c0.58-1.01,0.95-2.23,0.51-3.65c-0.53-1.72-2.04-3.05-3.84-3.22c-2.87-0.28-5.23,2.07-4.95,4.95 c0.18,1.79,1.5,3.31,3.22,3.84c1.43,0.44,2.64,0.07,3.65-0.51l2.5,2.5c0.39,0.39,1.01,0.39,1.4,0l0,0c0.39-0.39,0.39-1.01,0-1.4 L19.3,16.9z M15.5,17c-1.4,0-2.5-1.1-2.5-2.5s1.1-2.5,2.5-2.5s2.5,1.1,2.5,2.5S16.9,17,15.5,17z M12,20v2C6.48,22,2,17.52,2,12 C2,6.48,6.48,2,12,2c4.84,0,8.87,3.44,9.8,8h-2.07c-0.64-2.46-2.4-4.47-4.73-5.41V5c0,1.1-0.9,2-2,2h-2v2c0,0.55-0.45,1-1,1H8v2h2v3 H9l-4.79-4.79C4.08,10.79,4,11.38,4,12C4,16.41,7.59,20,12,20z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 22px 22px;
    flex-shrink: 0;
}

/* === Message box (info/error) === */
body.login .message,
body.login .success {
    border-left: 4px solid #FFB700;
    background: #fffbeb;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: none;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 20px;
}

body.login #login_error {
    border-left: 4px solid #EF4444;
    background: #fef2f2;
    border-radius: 8px;
    box-shadow: none;
    font-size: 14px;
    color: #991b1b;
}

/* === Form container === */
body.login form {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    padding: 24px;
    margin-top: 0;
}

/* === Labels === */
body.login label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

/* === Input fields === */
body.login input[type="text"],
body.login input[type="password"],
body.login input[type="email"] {
    border: 1.5px solid #E5E7EB;
    border-radius: 12px;
    padding: 10px 14px;
    min-height: 44px;
    font-size: 15px;
    font-family: inherit;
    color: #111827;
    background: #FAFAFA;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-shadow: none;
    width: 100%;
    box-sizing: border-box;
}

body.login input[type="text"]:focus,
body.login input[type="password"]:focus,
body.login input[type="email"]:focus {
    border-color: #FFB700;
    box-shadow: 0 0 0 3px rgba(255, 183, 0, 0.15);
    outline: none;
    background: #fff;
}

/* === Submit button ===
   WP core: `.wp-core-ui .button-primary` (0,2,0) — specificity 0,3,1 로 오버라이드. */
body.login.wp-core-ui .button-primary,
body.login .submit .button-primary {
    background: #FFB700;
    border: none;
    border-radius: 9999px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    padding: 10px 24px;
    min-height: 44px;
    height: auto;
    line-height: 1.5;
    text-shadow: none;
    box-shadow: 0 2px 8px rgba(255, 183, 0, 0.3);
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    cursor: pointer;
}

body.login.wp-core-ui .button-primary:hover,
body.login .submit .button-primary:hover {
    background: #e5a500;
    box-shadow: 0 4px 12px rgba(255, 183, 0, 0.4);
    transform: translateY(-1px);
}

body.login.wp-core-ui .button-primary:active,
body.login .submit .button-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(255, 183, 0, 0.3);
}

/* === Navigation links === */
body.login #nav,
body.login #backtoblog {
    text-align: center;
    padding: 0 24px;
}

body.login #nav a,
body.login #backtoblog a,
body.login .privacy-policy-page-link a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    color: #6B7280;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.15s;
}

body.login #nav a:hover,
body.login #backtoblog a:hover,
body.login .privacy-policy-page-link a:hover {
    color: #FFB700;
}

/* === Hide language selector === */
body.login .language-switcher {
    display: none;
}

/* === Login wrapper width === */
body.login #login {
    width: 380px;
    padding: 6% 0 0;
}

/* === Password indicator (reset page) === */
body.login .pw-weak {
    background: #FFB700;
    border-radius: 9999px;
    color: #fff;
    font-weight: 600;
    padding: 6px 16px;
}

/* === Mobile responsive === */
@media (max-width: 768px) {
    body.login #login {
        width: 90%;
        padding: 20px 0 0;
    }

    body.login form {
        padding: 20px 16px;
    }

    body.login h1 a {
        font-size: 1.25rem;
    }

    body.login h1 a::before {
        width: 36px;
        height: 36px;
        background-size: 20px 20px;
    }
}
