/* Custom Auth Page Styles */
/* Custom Auth Page Styles */
.ey-auth-container {
    position: fixed; /* Force full screen overlay */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999; /* On top of everything */
    display: flex;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: auto; /* Allow scroll if needed (e.g. small height landscape) but mostly hidden for desktop */
    background: #fff; /* Unified white background */
}

/* ============================
   Left Side: Branding (PC)
   ============================ */
.ey-auth-brand {
    flex: 1; /* Takes 50% width on Desktop */
    background: #fff; 
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    position: relative;
    color: #333; /* Text color */
    border-right: none; /* Removed border */
}

.ey-auth-header-content {
    text-align: center;
}

.ey-auth-logo {
    width: 120px;
    height: auto;
    border-radius: 18px;
    margin-bottom: 25px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); /* Soft shadow on logo */
}

.ey-brand-text h1 {
    font-size: 36px;
    font-weight: 800;
    margin: 0;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.ey-brand-text p {
    font-size: 18px;
    color: #666;
    margin-top: 10px;
}

/* ============================
   Right Side: Forms (PC)
   ============================ */
.ey-auth-form-wrapper {
    flex: 1; /* Takes other 50% */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: #fff; /* Match left side */
}

.ey-auth-card {
    background: #fff;
    width: 100%;
    max-width: 440px;
    padding: 40px;
    border-radius: 16px;
    box-shadow: none; /* optional: could remove shadow if background is same, or keep for 'pop' */
    /* Let's keep a very subtle border instead of shadow if blending into white, or just standard */
    border: 1px solid #f0f0f0; 
}

/* Hide mobile-only header on Desktop */
.ey-auth-header-mobile-only {
    display: none;
}

/* ============================
   Shared Form Styles (Kept)
   ============================ */
.ey-auth-tabs {
  display: flex;
  margin-bottom: 25px;
  border-bottom: 2px solid #eee;
}

.ey-tab-btn {
  flex: 1;
  background: none;
  border: none;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.ey-tab-btn.active {
  color: #007bff;
  border-bottom-color: #007bff;
}

.ey-tab-btn:hover {
  color: #007bff;
}

/* Google Role Selection Modal Fixes */
.ey-role-options .ey-radio-card {
    transition: all 0.3s ease;
}
.ey-role-options .ey-radio-card:hover {
    border-color: #ff9d66 !important;
    background: #fff5eb;
}
.ey-role-options input[type="radio"] {
    margin-right: 5px;
}

/* Forms */
.ey-auth-form {
  display: none;
}

.ey-auth-form.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

.ey-form-group {
  margin-bottom: 20px;
}

.ey-form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 8px;
}

.ey-form-group input[type="text"],
.ey-form-group input[type="email"],
.ey-form-group input[type="password"] {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  transition: border-color 0.2s;
  box-sizing: border-box; /* Fix for padding overflow */
}

.ey-form-group input:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Row for side-by-side inputs (e.g. passwords) */
.ey-form-row {
  display: flex;
  gap: 15px;
}
.ey-form-row .ey-form-group {
  flex: 1;
}

/* Custom Radio Cards */
.ey-radio-group {
  display: flex;
  gap: 10px;
}

.ey-radio-card {
  flex: 1;
  position: relative;
  cursor: pointer;
}

.ey-radio-card input {
  position: absolute;
  opacity: 0;
}

.ey-radio-card span {
  display: block;
  text-align: center;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-weight: 500;
  color: #555;
  transition: all 0.2s;
}

.ey-radio-card input:checked + span {
  background: #e7f1ff;
  border-color: #007bff;
  color: #007bff;
}

/* Buttons */
.ey-btn-primary {
  width: 100%;
  padding: 14px;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.ey-btn-primary:hover {
  background: #0056b3;
}

/* Actions & Footer */
.ey-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 14px;
  color: #666;
}

.ey-link {
  color: #007bff;
  text-decoration: none;
}

.ey-link:hover {
  text-decoration: underline;
}

.ey-auth-footer {
  text-align: center;
  margin-top: 25px;
  font-size: 14px;
  color: #666;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
}

.ey-auth-footer a {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}

/* Alerts */
.ey-auth-alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}

.ey-auth-alert.error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
}

.ey-auth-alert.success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.ey-form-hint {
  font-size: 13px;
  color: #999;
  margin-top: -10px;
  margin-bottom: 20px;
}


/* ============================
   Mobile Layout (Stacking)
   ============================ */
@media (max-width: 900px) { /* Trigger mobile view sooner for robustness */
    .ey-auth-container {
        position: relative; /* Reset from fixed */
        height: auto; /* Allow scrolling */
        width: 100%;
        z-index: 1; /* Reset z-index */
        flex-direction: column;
        min-height: auto; 
        padding: 0;
        background: #fff; /* Unified white background */
    }
    
    .ey-auth-brand {
        flex: 0 0 auto;
        width: 100%;
        padding: 5px 0 0 0; /* Minimized top padding (remove empty space above title) */
        background: #fff;
        border-bottom: none; 
        border-right: none;
        box-sizing: border-box;
    }

    /* Row Layout for Logo + Title on Mobile */
    .ey-auth-header-content {
        display: flex;
        flex-direction: row; 
        align-items: center;
        justify-content: center; 
        text-align: center;
        gap: 10px; 
        width: 100%;
    }
    
    .ey-auth-logo {
        width: 36px; /* Optimized size */
        margin-bottom: 0; 
        margin-left: 0;
        margin-right: 0;
        border-radius: 8px;
        box-shadow: none; 
    }
    
    .ey-brand-text {
        text-align: left; 
    }

    .ey-brand-text h1 {
        font-size: 18px; 
        margin-bottom: 0;
        line-height: 1;
        color: #1a1a1a;
    }
    
    .ey-brand-text p {
        display: none; 
    }

    /* Form Side */
    .ey-auth-form-wrapper {
        flex: 1;
        padding: 0; 
        background: #fff; 
        align-items: flex-start; 
    }

    .ey-auth-card {
        padding: 10px 20px 20px 20px; /* Reduced top padding on card */
        box-shadow: none; 
        border: none; 
        max-width: 100%; 
    }

    /* Mobile-specific header inside card (Subtitle style) */
    .ey-auth-header-mobile-only {
        display: block;
        text-align: center;
        margin-bottom: 15px; /* Tighter gap to form */
        margin-top: 0; /* No extra top margin */
    }
    .ey-auth-header-mobile-only h1 {
        font-size: 14px; /* Clearly smaller than title */
        font-weight: 500;
        color: #888; /* Lighter */
        margin: 0;
        text-transform: none; /* User didn't ask for caps */
        letter-spacing: 0;
    }
}
