/* 
  LOGIN PAGE STYLES 
*/

.login-page {
    min-height: 100vh;
    background-color: var(--ivory);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.login-split {
    display: flex;
    width: 100vw;
    min-height: 100vh;
}

.login-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ivory);
    position: relative;
    z-index: 10;
}

.login-right {
    flex: 1;
    background-image: url('assets/login-hero.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Beautiful seamless fade from the login panel into the image */
.login-right::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 30%; /* Smooth fade width */
    height: 100%;
    background: linear-gradient(90deg, var(--ivory) 0%, rgba(246, 243, 238, 0) 100%);
    pointer-events: none;
}

@media (max-width: 768px) {
    .login-split {
        flex-direction: column-reverse;
    }
    
    .login-right {
        min-height: 300px;
        flex: none;
    }
    
    .login-left {
        padding: 40px 20px;
    }
    
    /* On mobile, stack vertically, so fade from bottom to top */
    .login-right::after {
        top: auto;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 30%;
        background: linear-gradient(0deg, var(--ivory) 0%, rgba(246, 243, 238, 0) 100%);
    }
}

.login-container {
    width: 100%;
    max-width: 440px;
    padding: 40px;
    text-align: center;
}

.login-logo {
    width: 80px;
    height: auto;
    margin-bottom: 30px;
}

.login-form {
    display: none;
    flex-direction: column;
    animation: fadeIn 0.4s ease forwards;
}

.login-form.active {
    display: flex;
}

.login-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--text-dark); /* Black/deep dark */
    margin-bottom: 12px;
}

.login-subtitle {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-body);
    line-height: 1.6;
    margin-bottom: 32px;
}

.login-input-group {
    margin-bottom: 24px;
    text-align: left;
}

.login-input {
    width: 100%;
    padding: 16px 20px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-dark);
    background: transparent;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 4px;
    transition: var(--transition-smooth);
    outline: none;
}

.login-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(196, 151, 59, 0.1);
}

.login-input.code-style {
    text-align: center;
    letter-spacing: 12px;
    font-size: 1.5rem;
    font-weight: 600;
    padding-left: 32px; /* Offset the letter spacing */
}

/* Ensure the gold button spans full width and has standard styling */
.login-btn {
    width: 100%;
    padding: 16px 20px;
    background: var(--gold);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    margin-bottom: 16px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(196, 151, 59, 0.4);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.login-btn-pink {
    background: #e63989;
    color: #fff;
}

.login-btn-pink:hover {
    box-shadow: 0 8px 20px rgba(230, 57, 137, 0.4);
}

.login-back-link {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--gold);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    transition: var(--transition-smooth);
}

.login-back-link:hover {
    color: var(--teal);
}

/* Loading Spinner matches RSVP spinner */
.login-spinner {
    display: none;
    margin: 20px auto;
    color: var(--gold);
    text-align: center;
}

.login-spinner svg {
    width: 32px;
    height: 32px;
}

/* Elegant status message below spinner */
.login-status-msg {
    font-family: 'Great Vibes', cursive;
    font-size: 1.3rem;
    color: var(--gold);
    margin-top: 10px;
    letter-spacing: 0.5px;
    transition: opacity 0.25s ease;
}

/* Animated dots */
.dot-anim {
    display: inline-block;
    animation: dotPulse 1.4s infinite steps(4, end);
    width: 1.2em;
    text-align: left;
    vertical-align: bottom;
}

@keyframes dotPulse {
    0%   { content: ''; opacity: 0; }
    25%  { opacity: 0.4; }
    50%  { opacity: 0.7; }
    75%  { opacity: 1; }
    100% { opacity: 1; }
}

/* Inline error alert */
.login-error-alert {
    display: none;
    background: rgba(200, 30, 30, 0.08);
    border: 1px solid rgba(200, 30, 30, 0.3);
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: #b91c1c;
    text-align: center;
    animation: shakeIn 0.4s ease;
}

.login-error-alert.visible {
    display: block;
}

@keyframes shakeIn {
    0%   { transform: translateX(0); opacity: 0; }
    20%  { transform: translateX(-8px); }
    40%  { transform: translateX(6px); }
    60%  { transform: translateX(-4px); }
    80%  { transform: translateX(2px); opacity: 1; }
    100% { transform: translateX(0); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
