/**
 * Login Page CSS
 * Applies to the WordPress login page and registration form
 * Sources: 20.css, yhekordne tooltip from functions.php
 */

/* ── Make the login container appear ── */
#loginform, #nav {
    display: block !important;
}

/* ── Fit everything on the screen ── */
html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* ── Hide language switcher ── */
.language-switcher {
    display: none;
}

/* ── Remove focus outline (blue square) ── */
a:focus,
a:active,
.custom-login-menu a:focus,
.custom-login-menu a:active,
.toggle-submenu:focus,
.toggle-submenu:active {
    outline: none !important;
    box-shadow: none !important;
}

/* ── Login logo ── */
.login h1 a {
    background: url(https://nooruse5.ee/wp-content/uploads/2025/03/ttkk-logo-2025-et_punane.png);
    background-size: contain;
    background-position: center top;
    background-repeat: no-repeat;
    color: #3c434a;
    height: 84px;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.3;
    margin: 100px auto 25px;
    padding: 0;
    text-decoration: none;
    max-width: 100%;
    width: 100%;
    text-indent: -9999px;
    outline: 0;
    overflow: hidden;
    display: block;
    pointer-events: none;
}

/* ── Font family ── */
body * {
    font-family: "Rubik", sans-serif;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Login button recoloring ── */
.wp-core-ui .button-primary {
    background: #D90000;
    border-color: #D90000;
    color: #fff;
    text-decoration: none;
    text-shadow: none;
}
.wp-core-ui .button-primary:hover {
    background: #8f131d;
    border-color: #8f131d;
    color: #fff;
    text-decoration: none;
    text-shadow: none;
}

/* ── Input field focus colors ── */
.wp-core-ui input[type="text"]:focus,
.wp-core-ui input[type="password"]:focus,
.login .button.wp-hide-pw:focus,
.login form input[type=checkbox]:focus {
    border-color: #D90000 !important;
    border-width: 2px;
    outline: none !important;
    box-shadow: none !important;
}
.wp-cancel-pw > .dashicons,
.wp-hide-pw > .dashicons {
    color: #D70000;
}

/* ── Red checkmark ── */
input[type="checkbox"]:checked::before {
    content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 16 16" fill="red"><path transform="translate(0, 4)" d="M13.485 1.485a1.5 1.5 0 0 1 0 2.121l-7 7a1.5 1.5 0 0 1-2.121 0l-3-3a1.5 1.5 0 1 1 2.121-2.121l2.5 2.5 6.5-6.5a1.5 1.5 0 0 1 2.121 0z"/></svg>');
}

/* ── Login messages ── */
.login .message, .login .notice, .login .success {
    border-left: 4px solid #d71000;
}
#login {
    padding: 0 0 20px 0;
}
body > div.custom-login-menu {
    margin: -2px 0 0 0;
}

/* ── Initially hide login form (shown via JS) ── */
#loginform, #nav {
    display: none;
}
#loginform input, #loginform button {
    pointer-events: auto;
}

/* ── Intro text ── */
.intro-text {
    text-align: center;
    margin: 100px 0 0 0;
    font-size: 16px;
    color: #333;
    padding: 10px;
}

/* ── Custom login menu ── */
.custom-login-menu {
    background-color: white;
    border-bottom: 2px solid #ddd;
    padding: 10px 0;
    text-align: center;
    margin-bottom: 20px;
}
.custom-login-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.custom-login-menu ul li {
    display: inline-block;
    margin: 0 15px;
    position: relative;
}
.custom-login-menu ul li a {
    color: #333;
    text-decoration: none;
    font-weight: bold;
    font-size: larger;
    position: relative;
    padding-bottom: 5px;
}
.custom-login-menu ul li a:hover,
.custom-login-menu ul li a:focus {
    color: #000;
}
.custom-login-menu ul li a::after {
    content: '';
    display: block;
    height: 2px;
    width: 0;
    background: #D70000;
    transition: width 0.3s;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}
.custom-login-menu ul li a.active::after {
    width: 100%;
}

/* ── Submenu content ── */
.submenu-content {
    display: none;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 15px;
    text-align: left;
    margin: 0 20% 0 20%;
}
.submenu-content.active {
    display: block;
}
.submenu-content p {
    margin: 0;
}

/* ── Teated wrapper on login page ── */
.teated-wrapper {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}
.notice-info {
    max-width: 700px;
}

/* ── Teated bubble ── */
.teated-bubble {
    position: absolute;
    right: -10px;
    top: 14px;
    background: #e57373;
    color: #fff;
    border-radius: 50%;
    min-width: 16px;
    height: 16px;
    font-size: 0.85em;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border: 1px solid #fff;
    opacity: 0.85;
}

/* ── Kontakt section ── */
#kontakt-content {
    font-size: 1.08em;
    color: #222;
    line-height: 1.7;
    padding: 18px 24px;
    background: #f8fafc;
    border-radius: 8px;
    margin: 0 auto;
    max-width: 480px;
    box-shadow: 0 2px 8px #eee;
}
.kontakt-section {
    max-width: 93%;
    background: linear-gradient(135deg, #f8fafc 0%, #e3e8ee 100%);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    padding: 36px 28px;
    font-size: 1.08em;
    color: #222;
    line-height: 1.7;
    margin: 0 auto;
}
.kontakt-section h1,
.kontakt-section h2 {
    text-align: center;
    margin-bottom: 36px;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #2271b1;
}
.kontakt-section p {
    margin-bottom: 12px;
    font-size: 1.15em;
}
.kontakt-section ul, .kontakt-section ol {
    list-style: disc inside;
    margin-bottom: 12px;
}
.kontakt-section div:empty {
    min-height: 1.2em;
    display: block;
}

/* ── FAQ on login page ── */
.faq-section {
    max-width: 93%;
    background: linear-gradient(135deg, #f8fafc 0%, #e3e8ee 100%);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    padding: 36px 28px;
}
.faq-section h1 {
    text-align: center;
    margin-bottom: 36px;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #2271b1;
}
.faq-item {
    margin-bottom: 22px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 12px;
}
.faq-question {
    cursor: pointer;
    padding: 18px 22px;
    background: #f1f5fb;
    border-radius: 9px;
    font-size: 1.15rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: background 0.2s, box-shadow 0.2s, border 0.2s;
    position: relative;
    border: 2px solid transparent;
}
.faq-question:hover {
    background: #e0e7ef;
    box-shadow: 0 2px 12px rgba(34,113,177,0.07);
    border: 2px solid #2271b1;
}
.faq-question.open {
    background: #eaf6ff;
    border: 2px solid #2271b1;
}
.faq-indicator {
    display: inline-block;
    margin-right: 16px;
    transition: transform 0.3s;
    font-size: 1.5em;
    color: #2271b1;
    width: 28px;
    text-align: center;
}
.faq-question.open .faq-indicator {
    transform: rotate(90deg);
    color: #2ecc71;
}
.faq-answer {
    display: none;
    padding: 18px 22px 0 44px;
    font-size: 1.1em;
    color: #333;
    background: #f9fafb;
    border-radius: 0 0 9px 9px;
    margin-top: 2px;
    animation: fadeIn 0.3s;
}
.faq-answer p {
    font-size: 1.15em;
}
.faq-question.open + .faq-answer {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.faq-answer ul, .faq-answer ol {
    list-style: disc inside;
}

/* ── Teated content container ── */
#teated-content {
    margin: 0 10% 0 10%;
}

/* ── Responsive login page ── */
@media (max-width: 700px) {
    .custom-login-menu ul li {
        font-size: 11px !important;
        margin-top: 7px !important;
    }
    .submenu-content {
        margin: 0;
    }
    #teated-content {
        margin: 0;
    }
    .teade-form-container {
        padding: 14px 10px;
        max-width: 100%;
    }
}

/* ── Teated on login page ── */
.teade-form-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 32px 28px 24px 28px;
    max-width: 540px;
}
.teade-form-container h1 {
    margin-top: 0;
    margin-bottom: 18px;
    font-size: 1.7em;
    color: #2271b1;
    font-weight: 600;
}
.teade-logo {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 100px;
    height: auto;
    opacity: 0.92;
    pointer-events: none;
    user-select: none;
}
@media (max-width: 600px) {
    .teade-form-container {
        padding: 18px 8px;
        max-width: 98vw;
    }
}

/* ── Yhekordne tooltip on registration ── */
.yhekordne-tooltip {
    position: relative;
}
.yhekordne-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background: #271e1d;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: normal;
    line-height: 1.4;
    width: 240px;
    text-align: center;
    white-space: normal;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.yhekordne-tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1d2327;
    z-index: 100;
    pointer-events: none;
}
