@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #ff5722; /* User specified primary color */
    --secondary-color: #f0f0f0; /* Light gray background */
    --text-color: #333;
    --input-border-color: #ccc;
    --input-focus-border-color: #ff5722;
    --error-color: #d9534f;
    --white-color: #fff;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--secondary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: var(--text-color);
}

.login-container {
    display: flex;
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    max-width: 900px; /* Adjust as needed */
    width: 90%;
}

.login-box {
    padding: 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-box h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
    text-align: center;
}

.login-box p {
    margin-bottom: 30px;
    color: #666;
    text-align: center;
    font-size: 0.9em;
}

.input-group {
    margin-bottom: 20px;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9em;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--input-border-color);
    border-radius: var(--border-radius);
    box-sizing: border-box;
    font-size: 1em;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--input-focus-border-color);
    box-shadow: 0 0 0 2px rgba(255, 87, 34, 0.2); /* Subtle focus glow */
}

.input-group.error input {
    border-color: var(--error-color);
    background-color: rgba(217, 83, 79, 0.05);
}

.input-group.error input:focus {
    box-shadow: 0 0 0 2px rgba(217, 83, 79, 0.2);
}

.field-error {
    color: var(--error-color);
    font-size: 0.8em;
    margin-top: 4px;
    display: none;
}

.input-group.error .field-error {
    display: block;
}

.login-button {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.login-button:hover {
    background-color: #e64a19; /* Darker shade of primary color */
}

.login-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.login-button:disabled:hover {
    background-color: #cccccc;
}

.error-message {
    color: var(--error-color);
    font-size: 0.9em;
    margin-top: 15px;
    text-align: center;
    min-height: 1.2em; /* Reserve space */
}

.image-container {
    flex: 1;
    background-color: #f9f9f9; /* Slightly different background for image side */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    /* Hide image on smaller screens */
    display: none;
}

.image-container img {
    max-width: 100%;
    height: auto;
    display: block;
}

.input-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.input-row .input-group {
    flex: 1;
}

.password-input-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
}

.terms {
    font-size: 0.9em;
    color: #666;
    margin: 1rem 0;
}

.terms a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* --- Modal Styles --- */
.modal-overlay {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    margin: auto; /* Centered */
    padding: 30px;
    border: 1px solid #ddd;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 800px; /* Maximum width */
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
    animation-name: animatetop;
    animation-duration: 0.4s;
    max-height: 80vh; /* Limit height */
    overflow-y: auto; /* Add scroll for content */
}

/* Add Animation */
@keyframes animatetop {
  from {top: -300px; opacity: 0}
  to {top: 0; opacity: 1}
}

.modal-close-button {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
}

.modal-close-button:hover,
.modal-close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#privacy-content-area {
    margin-top: 20px;
    text-align: left; /* Ensure content inside is left-aligned */
}
/* --- End Modal Styles --- */

.terms a:hover {
    text-decoration: underline;
}

.login-link {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9em;
    color: #666;
}

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

.login-link a:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .image-container {
        display: flex; /* Show image container on larger screens */
    }
    .login-box {
       max-width: 400px; /* Limit login box width */
    }
}

@media (max-width: 767px) {
    .login-container {
        flex-direction: column;
        width: 95%;
        max-width: 450px;
    }
    .login-box {
        padding: 30px;
    }
    .input-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Email Confirmation Styles */
.email-confirmation-content {
    text-align: center;
    padding: 20px;
}

.confirmation-image {
    width: 120px;
    height: 120px;
    margin: 20px auto;
}

.email-address {
    font-weight: bold;
    color: #333;
    background: #f5f5f5;
    padding: 10px 20px;
    border-radius: 5px;
    margin: 15px 0;
    word-break: break-all;
}

.instruction-text {
    color: #666;
    margin: 20px 0;
}

.confirmation-actions {
    margin: 30px 0;
}

.secondary-button {
    background: #fff;
    color: #ee4d2d;
    border: 1px solid #ee4d2d;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.secondary-button:hover {
    background: #fff3f0;
}

.secondary-button:disabled {
    background: #f5f5f5;
    border-color: #ddd;
    color: #999;
    cursor: not-allowed;
}

.timer {
    color: #666;
    margin-top: 10px;
    font-size: 0.9em;
}

.email-tips {
    text-align: left;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
}

.email-tips h4 {
    color: #333;
    margin-bottom: 10px;
}

.email-tips ul {
    color: #666;
    padding-left: 20px;
}

.email-tips li {
    margin: 8px 0;
}

.bottom-links {
    margin-top: 30px;
}

.text-link {
    color: #ee4d2d;
    text-decoration: none;
    font-weight: 500;
}

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

/* Loading Indicator Styles (For Login/Signup Pages) */
.loading-indicator-container {
    position: fixed; /* Position relative to the viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex; /* Use flex to center content */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--secondary-color, #f0f0f0); /* Match body background */
    z-index: 999; /* Ensure it's above other potential initial content */
}

.loading-dots span {
    display: inline-block;
    width: 15px;
    height: 15px;
    margin: 0 5px;
    background-color: var(--primary-color); /* Use primary color */
    border-radius: 50%;
    animation: loading-bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes loading-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

.loading-text {
    margin-top: 20px;
    font-size: 1.2em;
    color: #555;
}
