/* ==========================================================================
   HEART MATES PORTAL - PREMIUM AUTHENTICATION POPUP MODAL STYLES
   ========================================================================== */

/* Glass Overlay Backdrop */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 17, 17, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    z-index: 999999 !important;
    padding: 10px;
    box-sizing: border-box;
}

/* Modal Open Dynamic State */
.auth-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Card Surface Wrapper - REDUCED SIZE FOR BETTER VISIBILITY */
.auth-modal-card {
    background: #FFFFFF;
    width: 100%;
    max-width: 390px; /* Perfectly downscaled for effortless screen visibility */
    max-height: calc(100vh - 30px);
    border-radius: 12px;
    border: 1px solid #EFECE6;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transform: translateY(-20px);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    font-family: 'Segoe UI', system-ui, sans-serif;
    box-sizing: border-box;
    overflow: hidden;
}

.auth-modal-overlay.open .auth-modal-card {
    transform: translateY(0);
}

/* Header Banner Layout */
.auth-modal-header {
    background-color: #111111;
    color: #FFFFFF;
    padding: 18px 20px;
    text-align: center;
    border-bottom: 3px solid #D2AE6D;
    position: relative;
    flex-shrink: 0;
}

.auth-modal-logo {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-modal-logo i {
    color: #D2AE6D;
}

.auth-modal-subtitle {
    margin: 4px 0 0 0;
    color: #999999;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Fixed Close Trigger Button Position */
.auth-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    color: #888888;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
    z-index: 1010;
}

.auth-modal-close:hover {
    color: #D2AE6D;
}

/* Tab Switching Control Header */
.auth-tab-buttons-group {
    display: flex;
    background-color: #FAF9F5;
    border-bottom: 1px solid #EFECE6;
    flex-shrink: 0;
}

.auth-tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #666666;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    outline: none;
}

.auth-tab-btn:hover {
    color: #111111;
    background-color: #EFECE6;
}

.auth-tab-btn.active {
    color: #111111;
    background-color: #FFFFFF;
    border-bottom: 3px solid #D2AE6D;
}

/* Scrollable Container Form Wrapper */
.auth-tabs-content-container {
    padding: 18px 22px;
    overflow-y: auto;
    flex-grow: 1;
    box-sizing: border-box;
}

/* Custom Scrollbar Styling for a Clean Interface */
.auth-tabs-content-container::-webkit-scrollbar {
    width: 5px;
}
.auth-tabs-content-container::-webkit-scrollbar-track {
    background: #FAF9F5;
}
.auth-tabs-content-container::-webkit-scrollbar-thumb {
    background: #DCD9D2;
    border-radius: 4px;
}
.auth-tabs-content-container::-webkit-scrollbar-thumb:hover {
    background: #D2AE6D;
}

.auth-form-tab-panel {
    display: none;
}

.auth-form-tab-panel.active {
    display: block;
}

.auth-input-field-wrapper {
    margin-bottom: 12px;
    width: 100%;
    box-sizing: border-box;
}

.auth-input-field-wrapper label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #333333;
    margin-bottom: 4px;
}

.auth-input-field-wrapper label i {
    color: #D2AE6D;
    margin-right: 4px;
    width: 14px;
    text-align: center;
}

.auth-input-field-wrapper input {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.9rem;
    border: 1px solid #DCD9D2;
    border-radius: 4px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input-field-wrapper input:focus {
    border-color: #D2AE6D;
    box-shadow: 0 0 0 3px rgba(210, 174, 109, 0.12);
}

/* Forms Utility Row elements */
.auth-form-utility-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.8rem;
}

.auth-remember-me-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #555555;
    cursor: pointer;
}

.auth-remember-me-toggle input {
    cursor: pointer;
    accent-color: #D2AE6D;
    margin: 0;
}

.auth-forgot-link {
    color: #666666;
    text-decoration: none;
    font-weight: 500;
}

.auth-forgot-link:hover {
    color: #D2AE6D;
    text-decoration: underline;
}

/* CORRECTION: Fixed Terms & Conditions Agreement Checkbox Layout Grid */
.terms-checkbox-wrapper {
    margin: 14px 0 16px 0 !important;
    width: 100%;
    box-sizing: border-box;
}

.auth-terms-policy-label {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    cursor: pointer;
    font-size: 0.82rem;
    color: #555555;
    line-height: 1.4;
    width: 100%;
    box-sizing: border-box;
    user-select: none;
}

.auth-terms-policy-label input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    margin: 1px 0 0 0 !important;
    accent-color: #D2AE6D;
    flex-shrink: 0 !important; /* Protects checkbox box from squishing or distorting */
}

.auth-terms-policy-label span {
    flex-grow: 1;
}

/* Submit Action Button Core Components */
.auth-submit-action-btn {
    width: 100%;
    background-color: #111111;
    color: #FFFFFF;
    border: none;
    padding: 10px 14px;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.auth-submit-action-btn:hover {
    background-color: #D2AE6D;
    color: #111111;
}

.signup-premium-gradient-btn {
    background-color: #D2AE6D;
    color: #111111;
}

.signup-premium-gradient-btn:hover {
    background-color: #BD995A;
    color: #FFFFFF;
}

/* Error Alerts Placement */
.auth-error-alert-box {
    background-color: #FFF2F4;
    border-left: 4px solid #DC3545;
    padding: 10px 14px;
    margin: 10px 22px -5px 22px;
    border-radius: 4px;
    flex-shrink: 0;
}

.auth-error-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-error-list li {
    color: #DC3545;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.4;
}