/* Sterling Path Login Gate Modal Styles */

.sp-login-gate-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-login-gate-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);

    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);

    background-color: rgba(0, 0, 0, 0.7) !important;
}

.sp-login-gate-container {
    position: relative;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1000000;
}

.sp-login-gate-scrollable {
    padding: 30px;

}

.sp-login-gate-container * {
    pointer-events: auto !important;
}

.sp-login-gate-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 15px;
    min-height: 50px;
}

.sp-login-gate-logo {
    flex: 0 0 auto;
    max-width: 90px;
    max-height: 50px;
    width: auto;
    height: auto;
    object-fit: contain;
}

#sp-login-gate-modal .sp-gate-picture,
#sp-ruo-stage1-overlay .sp-gate-picture {
    display: contents;
}

.sp-login-gate-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #002868 0%, #003580 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.sp-login-gate-title {
    font-size: 36px !important;
    font-weight: 700;
    color: #002868;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
}

.sp-login-gate-message {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0 0 20px 0;
    text-align: center;
    text-wrap: pretty;
}

.sp-login-gate-tabs {
    display: flex;
    border-bottom: 2px solid #e5e5e5;
    margin-bottom: 20px;
}

.sp-login-gate-tab {
    flex: 1;
    text-align: center;
    padding: 12px;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s ease;
}

.sp-login-gate-tab:hover {
    color: #002868;
}

.sp-login-gate-tab.active {
    color: #002868;
    border-bottom-color: #002868;
}

.sp-login-gate-content {
    display: none;
}

.sp-login-gate-content.active {
    display: block;
}

#sp-login-gate-modal .sp-login-gate-tabs,
#sp-login-gate-modal .sp-login-gate-tab,
#sp-login-gate-modal .sp-login-gate-tab.active,
#sp-login-gate-modal .sp-login-gate-content,
#sp-login-gate-modal .sp-login-gate-content.active,
#sp-login-gate-modal .sp-login-gate-form {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}

.sp-login-gate-form {
    margin-bottom: 20px;
}

.sp-login-gate-form label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.sp-login-gate-form input[type="text"],
.sp-login-gate-form input[type="email"],
.sp-login-gate-form input[type="password"],
.sp-login-gate-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    margin-bottom: 14px;
    box-sizing: border-box;
}

.sp-login-gate-form input[type="text"]:focus,
.sp-login-gate-form input[type="email"]:focus,
.sp-login-gate-form input[type="password"]:focus,
.sp-login-gate-form select:focus {
    outline: none;
    border-color: #002868;
    box-shadow: 0 0 0 3px rgba(0, 40, 104, 0.1);
}

.sp-password-wrapper {
    position: relative;
    margin-bottom: 14px;
}

.sp-password-wrapper input[type="password"],
.sp-password-wrapper input[type="text"] {
    width: 100%;
    padding: 10px 40px 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    margin-bottom: 0;
    box-sizing: border-box;
}

.sp-password-wrapper input:focus {
    outline: none;
    border-color: #002868;
    box-shadow: 0 0 0 3px rgba(0, 40, 104, 0.1);
}

.sp-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
}

.sp-password-toggle:hover {
    color: #002868;
    background: rgba(0, 40, 104, 0.05);
}

.sp-eye-icon {
    display: block;
}

.sp-login-gate-button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #002868 0%, #003580 100%);
    color: #FFFFFF !important;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sp-login-gate-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 40, 104, 0.3);
    color: #FFFFFF !important;
}

.sp-login-gate-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    color: #FFFFFF !important;
}

.sp-login-gate-remember {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.sp-login-gate-remember input {
    margin-right: 8px;
}

.sp-login-gate-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    margin-bottom: 14px;
    padding: 12px;
    background: #F0F9FF;
    border-radius: 4px;
    border: 1px solid #BFDBFE;
}

.sp-login-gate-checkbox-wrapper input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 2px;
    flex-shrink: 0;
}

.sp-login-gate-checkbox-wrapper label {
    margin: 0 !important;
    font-weight: normal !important;
    color: #1E40AF;
    line-height: 1.4;
}

.sp-login-gate-links {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.sp-login-gate-links a {
    color: #002868;
    text-decoration: none;
}

.sp-login-gate-links a:hover {
    text-decoration: underline;
}

.sp-login-gate-error {
    background: #fee;
    border-left: 4px solid #BF0A30;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 4px;
    color: #BF0A30;
}

.sp-apple-relay-warn {
    font-size: 12px;
    color: #737373;
    text-align: center;
    margin-top: 6px;
    line-height: 1.3;
}

.sp-apple-relay-warn-strong {
    color: #BF0A30;
    font-weight: 500;
}

.sp-login-gate-footer {
    text-align: center;
    margin: 0;
    padding: 15px 30px;
    border-top: 1px solid #e5e5e5;
    font-size: 14px;
    color: #999;
    flex-shrink: 0;
}

html.sp-login-gate-active,
body.sp-login-gate-active {
    overflow: hidden !important;
    height: 100% !important;
}

.sp-login-gate-container {
    touch-action: pan-y;
}

@media (max-width: 600px) {
    .sp-login-gate-modal {
        align-items: stretch;
    }

    .sp-login-gate-container {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: 0;
        padding: 0;
        box-sizing: border-box;
    }



    .sp-login-gate-title {
        font-size: 24px !important;
    }

    .sp-login-gate-message {
        font-size: 14px;
    }

    .sp-login-gate-footer {
        margin-top: 20px;
        padding-top: 15px;
        padding-bottom: env(safe-area-inset-bottom, 10px);
    }

    .sp-social-buttons {
        flex-wrap: wrap;
    }

    .sp-social-btn-wrap,
    .sp-social-buttons > * {
        flex: none !important;
        width: 100% !important;
    }
}

.sp-social-separator {
    height: 1px;
    background: #e5e5e5;
    margin: 20px 0;
}

.sp-social-buttons {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: stretch;
}

.sp-social-btn-wrap {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.sp-social-btn-wrap[id*="google"] {
    overflow: visible;
    padding-right: 2px;
}
.sp-social-btn-wrap[id*="google"] iframe {
    display: block;
}

.sp-social-buttons > *:not(.sp-social-btn-wrap) {
    flex: 1;
    min-width: 0;
}

.sp-social-buttons:has(> :only-child) > .sp-apple-signin-btn,
.sp-social-buttons:has(> :only-child) > .sp-social-btn-wrap {
    flex: 0 1 auto;
    align-self: center;
}

#sp-apple-signin-wrap,
#sp-apple-register-wrap {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
}

.sp-apple-signin-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    width: 100% !important;
    height: 40px !important;
    background: #fff !important;
    color: #3c4043 !important;
    border: 1px solid #dadce0 !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    cursor: pointer !important;
    transition: background 0.2s ease, border-color 0.2s ease !important;
    box-sizing: border-box !important;
    padding: 0 12px !important;
    white-space: nowrap !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 40px !important;
    text-decoration: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.sp-apple-signin-btn:hover {
    background: #f7f8f8 !important;
    border-color: #c6c9cd !important;
    color: #3c4043 !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

.sp-apple-signin-btn svg {
    flex-shrink: 0;
    color: #000 !important;
}

#sp-login-gate-modal .sp-gate-brandpanel,
#sp-login-gate-modal .sp-gate-kicker,
#sp-login-gate-modal .sp-gate-trust,
#sp-login-gate-modal .sp-social-separator span { display: none; }

#sp-login-gate-modal .sp-gate-formside { display: block; }

#sp-login-gate-modal .sp-login-gate-header { display: block; text-align: center; }
#sp-login-gate-modal .sp-login-gate-title { white-space: normal; }
#sp-login-gate-modal .sp-login-gate-message { display: block; width: auto; margin: 0 0 16px; text-align: center; }
#sp-login-gate-modal .sp-gate-logo-inline { display: block; margin: 0 auto 14px; height: 48px; width: auto; object-fit: contain; }

#sp-login-gate-modal .sp-login-gate-content.active { display: flex; flex-direction: column; }
#sp-login-gate-modal .sp-login-gate-content > .sp-login-gate-form { order: 1; }
#sp-login-gate-modal .sp-login-gate-content > .sp-login-gate-links { order: 2; }
#sp-login-gate-modal .sp-login-gate-content > .sp-social-separator { order: 3; }
#sp-login-gate-modal .sp-login-gate-content > .sp-social-buttons { order: 4; }

#sp-login-gate-modal #register-content > * { order: 0; }
#sp-login-gate-modal .sp-reg-step__title { font-weight: 600; margin: 0 0 8px; }
#sp-login-gate-modal .sp-reg-step__num { display: inline-block; width: 22px; height: 22px; line-height: 22px; margin-right: 8px; border-radius: 50%; background: #1e2a78; color: #fff; text-align: center; font-size: 12px; }
#sp-login-gate-modal .sp-reg-option { border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px 16px 16px; }
#sp-login-gate-modal .sp-reg-option__title { margin: 0 0 10px; font-size: 13.5px; font-weight: 600; color: #1f2937; }
#sp-login-gate-modal .sp-reg-option .sp-login-gate-form { margin: 0; }
#sp-login-gate-modal .sp-reg-or { display: flex; align-items: center; gap: 12px; margin: 12px 4px; font-size: 12.5px; color: #6b7280; }
#sp-login-gate-modal .sp-reg-or::before,
#sp-login-gate-modal .sp-reg-or::after { content: ""; flex: 1; height: 1px; background: #e2e8f0; }
#sp-login-gate-modal .sp-login-gate-content > .sp-login-gate-custom-message-bottom { order: 5; }
#sp-login-gate-modal .sp-login-gate-remember { display: flex; align-items: center; gap: 9px; margin: 2px 0 10px; }

#sp-login-gate-modal .sp-field-row { display: block; }
#sp-login-gate-modal .sp-field { display: block; margin-bottom: 14px; }
#sp-login-gate-modal .sp-login-gate-form input,
#sp-login-gate-modal .sp-login-gate-form select { margin: 0; }
#sp-login-gate-modal .sp-password-wrapper { display: flex; margin: 0; }

#sp-login-gate-modal .sp-social-btn-wrap-google { position: relative; }
#sp-login-gate-modal .sp-google-overlay { position: absolute; left: 0; right: 0; top: 0; height: 44px; z-index: 3; opacity: 0; overflow: hidden; }
#sp-login-gate-modal .sp-google-overlay > div,
#sp-login-gate-modal .sp-google-overlay iframe { width: 100% !important; height: 100% !important; margin: 0 !important; }
#sp-login-gate-modal .sp-social-btn-wrap-google .sp-google-btn { visibility: hidden; }
#sp-login-gate-modal .sp-social-btn-wrap-google.is-ready .sp-google-btn { visibility: visible; }
#sp-login-gate-modal .sp-google-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; border: 1px solid #dadce0; border-radius: 4px; background: #fff; color: #1f1f1f; font-size: 14px; font-weight: 500; cursor: pointer; }
#sp-login-gate-modal .sp-google-btn svg { flex: none; }

#sp-login-gate-modal .sp-social-buttons { position: relative; }
#sp-login-gate-modal .sp-social-lock { display: none; position: absolute; left: 0; right: 0; top: 0; height: 44px; z-index: 5; width: 100%; padding: 0; border: 0; background: transparent; cursor: not-allowed; }
#sp-login-gate-modal .sp-social-gated .sp-social-lock { display: block; }
#sp-login-gate-modal .sp-social-gated .sp-google-btn,
#sp-login-gate-modal .sp-social-gated .sp-apple-signin-btn { opacity: .55 !important; filter: grayscale(1) !important; background: #F3F4F6 !important; color: #6B7280 !important; cursor: not-allowed; }
#sp-login-gate-modal .sp-social-gated .sp-apple-signin-btn svg { color: #6B7280 !important; }

#sp-login-gate-modal .sp-apple-relay-warn { font-size: 11px !important; white-space: nowrap; text-align: center; }

#sp-login-gate-modal .sp-login-gate-checkbox-wrapper { display: flex; align-items: flex-start; gap: 10px; }
#sp-login-gate-modal .sp-login-gate-checkbox-wrapper input[type="checkbox"] { flex: none; margin-top: 2px; }
#sp-login-gate-modal .sp-login-gate-checkbox-wrapper label { max-height: none; overflow: visible; }
#sp-login-gate-modal .sp-login-gate-checkbox-wrapper:has(#ruo_agreed) label { max-height: 5.6em; overflow-y: auto; padding-right: 8px; }

#sp-login-gate-modal .sp-apple-signin-btn { min-height: 44px !important; height: 44px !important; }

#sp-login-gate-modal .sp-gate-maincol{display:contents}
