/* auth.css */

:root {
    --primary-color: #4FD1C5; /* Turquoise/Cyan */
    --secondary-color: #FF6B6B; /* Coral Red */
    --neutral-color-light: #F7F9FC;
    --neutral-color-dark: #2D3748;
    --text-color-light: #1A202C;
    --text-color-dark: #E2E8F0;
    --border-color: #E2E8F0; /* Lighter border for inputs */
    --input-bg-color: #FFFFFF;
    --card-bg-color: #FFFFFF;
    --container-bg-color: #4FD1C5; /* Page background */
    --success-color: #38A169;
    --error-color: #E53E3E;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    --border-radius-sm: 8px;
    --border-radius-md: 16px; /* For inputs and buttons */
    --border-radius-lg: 24px; /* For the card */
    --box-shadow: none; /* No shadow for the card */
    --transition-speed: 0.2s ease-in-out;
}

body {
    font-family: var(--font-family);
    background-color: var(--container-bg-color);
    color: var(--text-color-light);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    line-height: 1.6;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    height: 500px;
}

.auth-card {
    background-color: var(--card-bg-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    padding: 40px;
    overflow: hidden;
    width: 100%;
    max-width: 480px; /* Wider card for placeholder */
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-header .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.auth-header .logo img {
    height: 80px; /* Increased logo size */
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px; /* Added space below logo */
}

.auth-header h1 {
    font-size: 2.25rem; /* Slightly larger */
    color: var(--primary-color);
    margin: 16px 0 0 0; /* Margin top for spacing from logo */
    font-weight: 700;
    text-align: center;
}

.auth-header h2 {
    font-size: 1.5rem;
    color: var(--text-color-light);
    margin-bottom: 8px;
    font-weight: 600;
}

.auth-subtitle {
    font-size: 1rem; /* Matches input placeholder style */
    color: #A0AEC0; /* Light gray for placeholder-like text */
    margin-bottom: 32px; /* More space before form elements */
    text-align: center;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #4A5568;
}

.input-with-icon {
    position: relative;
}

/* .input-with-icon i styles are less relevant for the new email step design */
.input-with-icon i {
    position: absolute;
    left: 15px; /* Adjusted icon position */
    top: 50%;
    transform: translateY(-50%);
    color: #A0AEC0;
    font-size: 1rem; /* Slightly larger icon */
}

input[type="email"],
input[type="text"] {
    width: 100%;
    padding: 14px 20px 14px 45px; /* Padding for left icon */
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background-color: var(--input-bg-color);
    color: var(--text-color-light);
    font-size: 1rem;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
    box-sizing: border-box;
    text-align: left; /* Align text to left now */
}

/* Ensure email input in the form has correct padding for icon */
.auth-form form[action="auth.php"] .input-with-icon input[type="email"] {
    padding-left: 45px; /* Explicitly set left padding for icon */
}

input[type="email"]:focus,
input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.3);
}

/* Error state for input fields */
.input-error {
    border-color: var(--error-color) !important;
}

/* Light placeholder style */
.light-placeholder::placeholder {
    color: #A0AEC0;
    font-weight: normal;
    opacity: 0.7;
}

/* Center text class */
.text-center {
    text-align: center;
}

.input-error:focus {
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.3) !important;
}

input::placeholder {
    color: #A0AEC0;
    text-align: left; /* Align placeholder to left */
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px; /* Taller button */
    border: none;
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
    text-decoration: none;
    width: 100%;
}

.btn i {
    margin-left: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #3EBEB0; /* Slightly darker turquoise for hover */
    transform: translateY(-2px);
}


.btn-text {
    background-color: transparent;
    color: var(--primary-color);
    padding: 8px 0; /* Minimal padding */
    width: auto;
    font-weight: 500;
}

.btn-text:hover {
    text-decoration: underline;
}

.btn-text i {
    margin-right: 6px;
    margin-left: 0;
}

.alert {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.alert i {
    margin-right: 10px;
    font-size: 1.1rem;
}

.alert-error {
    background-color: #FFF5F5; /* Light red */
    color: var(--error-color);
    border: 1px solid #FED7D7;
}

.alert-success {
    background-color: #F0FFF4; /* Light green */
    color: var(--success-color);
    border: 1px solid #C6F6D5;
}

.otp-container input[type="text"] {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 0.5em; /* Spacing between digits */
    padding-left: 12px; /* Reset padding for OTP */
    font-weight: 600;
}

.otp-info {
    font-size: 0.9rem;
    color: #718096;
    text-align: center;
    margin-top: 12px;
}

.form-footer {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: 24px;
}

/* Auth Form */
.auth-form {
    margin-top: 24px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.85rem;
    color: #718096;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.field-error-message {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-bottom: 10px; /* Space above the input field */
    display: flex;
    align-items: center;
    height: 24px; /* Fixed height instead of min-height */
    visibility: visible; /* Always visible for consistent layout */
    opacity: 0; /* But transparent when not needed */
    transition: opacity 0.2s ease; /* Smooth transition when showing/hiding */
    overflow: hidden; /* Prevent content from expanding the container */
}

.field-error-message:not(:empty) {
    opacity: 1; /* Show when there's content */
}

.field-error-message i {
    margin-right: 6px;
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .auth-card {
        padding: 24px;
    }
    .auth-header h1 {
        font-size: 1.8rem;
    }
    .auth-header h2 {
        font-size: 1.3rem;
    }
    .btn {
        font-size: 0.95rem;
    }
}
