/* Login page specific styles */
.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

.login-card {
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 30rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Header styles */
.login-header {
    text-align: center;
}

.logo {
    margin-bottom: 1.5rem;
}

.login-header h1 {
    font-size: 1.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-secondary);
}

/* Form styles */
.login-form {
    position: relative;
    min-height: 10rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* State management */
.login-form > div {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-out, visibility 0.2s ease-out;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1;
}

.login-form > div:not(.hidden) {
    opacity: 1;
    visibility: visible;
    position: relative;
    z-index: 2;
}

/* Error state adjustments */
.error-state:not(.hidden) {
    display: flex !important;
    flex-direction: column;
    align-items: center;
}

/* Login actions adjustments */
.login-actions:not(.hidden) {
    display: flex !important;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* Button styles */
.login-button-container {
    position: relative;
}

.login-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.login-button:hover {
    background-color: var(--primary-hover);
}

.login-button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.retry-button {
    padding: 0.75rem 1.5rem;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.retry-button:hover {
    background-color: var(--background-color);
}

/* Loading state */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem 0;
    width: 100%;
}

/* Loading state adjustments */
.loading-state:not(.hidden) {
    display: flex !important;
}

.spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error state */
.error-state {
    text-align: center;
    padding: 2rem 0;
}

.error-icon {
    width: 3rem;
    height: 3rem;
    background-color: var(--error-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

#errorMessage {
    color: var(--error-color);
    margin-bottom: 1rem;
}

/* Footer styles */
.login-footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.login-footer nav {
    margin-top: 0.5rem;
}

.login-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 0.5rem;
}

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

/* Login help text */
.login-help {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.login-help a {
    color: var(--primary-color);
    text-decoration: none;
}

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

/* Responsive adjustments */
@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
}

/* CSS for the consent checkbox */

.consent-checkbox-container {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.consent-checkbox-container input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.consent-checkbox-container label {
    font-size: 14px;
    cursor: pointer;
}

/* Add a tooltip to explain the checkbox purpose */
.consent-checkbox-container {
    position: relative;
}

.consent-checkbox-container label:hover::after {
    content: "Check this box if you need to update your permissions or if you're experiencing access issues";
    position: absolute;
    left: 0;
    bottom: 25px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    width: 220px;
    z-index: 100;
}
