/**
 * Shared — Login & Signup Modal Styles
 *
 * Covers: header Sign up/Log in triggers, modal overlay, forms, checkboxes, captcha.
 * Enqueued by config/us/functions.php and config/in/functions.php.
 *
 * @package gambleonline
 */

/* ============================================================
   HEADER SIGN UP / LOG IN TRIGGER BAR — DESKTOP (default)
   ============================================================ */
.main-signup {
    margin: 0 auto;
    width: 100%;
    max-width: 90rem;
    color: #fff;
    font-weight: 700;
}
.main-signup span {
    font-weight: 800;
    cursor: pointer;
}
.main-signup span.sign-in {
    color: #fff;
    will-change: background-color, color;
    transition: color 0.2s ease;
    border-radius: 10px;
    padding: 5px;
}
.main-signup span.sign-in:hover {
    color: #fdfdfd;
    text-decoration: none;
}
.main-signup .sign-triggers {
    float: right;
    padding: 0 0.75em;
}
.main-signup span.sign-in.log::before {
    content: "";
    width: 20px;
    height: 20px;
    background-image: url(../images/icons/user.svg);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    display: inline-block;
    vertical-align: sub;
    margin-right: 5px;
}

/* On desktop: hide .main-signup only when nested inside .main-nav-wrapper (wrong placement) */
@media (min-width: 1025px) {
    .main-header .main-nav-wrapper .main-signup {
        display: none;
    }
}

/* ============================================================
   HEADER SIGN UP / LOG IN — MOBILE/TABLET (≤ 1024px)
   Compact: absolute position, hide "Sign up" text, show only icon for Log in
   ============================================================ */
@media (max-width: 1024px) {
    .main-header > .main-signup {
        width: fit-content;
    }
    .main-signup {
        position: absolute;
        right: 40px;
        margin: auto;
        top: 50%;
        transform: translateY(-50%);
    }
    .main-signup .sign-triggers {
        float: none;
        margin: 0 auto;
        display: block;
        text-align: center;
    }
    #openModalSign {
        display: none;
    }
    .main-signup span.sign-in.log::before {
        width: 25px;
        height: 25px;
    }
    .main-signup span.sign-in.log span {
        display: none;
    }
}

/* ============================================================
   MODAL OVERLAY
   ============================================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}
.modal-content {
    background-color: #fff;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 788px;
    border-radius: 8px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

/* ============================================================
   MODAL CLOSE BUTTONS
   ============================================================ */
.closeLogin,
.closeSignup {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    color: #aaa;
    z-index: 99999;
}
.closeLogin:hover,
.closeLogin:focus,
.closeSignup:hover,
.closeSignup:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-title {
    margin: 0 0 30px;
    color: #001039;
    font: normal normal bold 36px / 43px Barlow, sans-serif;
    text-align: left;
    position: relative;
}
.form-title::after {
    content: "";
    background: #48d782 0 0 no-repeat padding-box;
    display: block;
    height: 4px;
    width: 200px;
    margin-top: 5px;
}
.form-group {
    margin-bottom: 10px;
}
.comment-form-comment label,
.form-group label {
    font: normal normal bold 18px / 22px Barlow, sans-serif;
    margin-bottom: 10px;
    display: block;
}
.modal-content input[type="text"],
.modal-content input[type="email"],
.modal-content input[type="password"],
.modal-content select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 10px;
}
.modal-content .name-fields input {
    display: inline-block;
    width: 100%;
}
.modal-content .password-fields input {
    display: inline-block;
    width: calc(50% - 15px);
    margin-right: 20px;
}
.modal-content .password-fields input:last-child {
    margin-right: 0;
}
#signupForm input,
#loginModal input {
    font: italic normal normal 15px / 18px Barlow, sans-serif;
    letter-spacing: 0;
    color: #00103e;
    opacity: 0.5;
}
.submit-btn {
    width: 100%;
    background-color: #34c759;
    color: #fff;
    padding: 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
}
.submit-btn:hover {
    background-color: #28a745;
}
.form-group.submit {
    justify-content: space-between;
    align-items: center;
}
.form-group.submit .login-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
    margin-top: 10px;
}
.form-group.submit .login-link .submit-btn {
    margin-bottom: 10px;
}
span.signup,
span.login,
.forgot-pass a {
    color: #09a7ea;
    font: normal normal normal 15px / 18px Barlow, sans-serif;
    text-decoration: underline;
    cursor: pointer;
}
.checkbox-container {
    display: flex;
    align-items: center;
    font-size: 14px;
}
.form-group .checkbox-container input {
    margin-right: 5px;
    vertical-align: text-bottom;
}
.form-group label.checkbox-container {
    font-style: italic;
    font-size: 12px;
    font-weight: 400;
}

/* ============================================================
   CAPTCHA & CUSTOM SELECT
   ============================================================ */
.captcha {
    text-align: center;
    width: fit-content;
    margin-bottom: 10px;
}
.custom-select {
    position: relative;
}
.custom-select select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.custom-select::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #48d782;
    transform: translateY(-50%);
    pointer-events: none;
    cursor: pointer;
}

/* ============================================================
   FOOTER LANGUAGE SWITCHER
   ============================================================ */

/* Footer lang-menu — own full-width row, left-aligned, with dropdown arrow indicator */
.main-footer .main-wrapper .lang-menu {
    width: 100% !important;
    flex: 0 0 100% !important;
    margin-bottom: 20px;
    position: relative;
    text-align: left;
}

.main-footer .main-wrapper .lang-menu span.lang-switch {
    position: relative;
    display: inline-block;
}

.main-footer .main-wrapper .lang-menu span.lang-switch::after {
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid #48d782;
    content: "";
    height: 0;
    top: 63%;
    transform: translateY(-50%) rotate(180deg);
    width: 0;
    position: absolute;
    right: -20px;
}

/* Override float:right from styles/custom/custom.css — footer flag must be left-aligned */
.main-footer .lang-menu span.lang-switch {
    float: none !important;
}

.lang-switch img {
    position: relative;
    top: 3px;
}

/* ============================================================
   SUCCESS / ERROR MODALS
   ============================================================ */
.reg-modal,
.err-modal {
    width: 100vw;
    height: 100vw;
    background-color: rgba(0, 0, 0, 0.45);
    position: absolute;
    z-index: 999999;
    transition: opacity 1s ease;
    opacity: 1;
}
.reg-modal p {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 30px;
    z-index: 999990;
    width: 100%;
    margin: auto;
    font: normal normal bold 22px / 38px Barlow, sans-serif;
    text-align: center;
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}
.err-modal p {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 30px;
    z-index: 999990;
    width: 100%;
    margin: auto;
    font: normal normal bold 22px / 38px Barlow, sans-serif;
    text-align: center;
    color: hsl(0, 83%, 28%);
    background-color: #f3a5a5;
    border-color: #e29090;
}
.reg-modal.fade-out,
.err-modal.fade-out {
    opacity: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .form-group {
        text-align: center;
    }
    span.signup,
    span.login,
    .forgot-pass a {
        margin: 10px auto;
    }
    #signupModal .form-title,
    #loginModal .form-title {
        font: normal normal bold 22px / 24px Barlow, sans-serif;
    }
    #signupModal .form-group label:not(.checkbox-container),
    #loginModal .form-group label:not(.checkbox-container) {
        font: normal normal bold 16px / 18px Barlow, sans-serif;
    }
    #signupForm input,
    #loginModal input {
        padding: 8px;
        margin-bottom: 5px;
    }
    #signupForm .form-group.submit,
    #loginModal .form-group.submit {
        flex-direction: column;
    }
    .modal-content {
        width: 95%;
    }
    .name-fields input,
    .password-fields input {
        width: 100%;
        margin-right: 0;
    }
}
