/* app/static/css/auth.css */

/* Authentication Layout */
.auth-body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    overflow: hidden;
}

.auth-branding {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    position: relative;
}

.auth-branding::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    opacity: 0.3;
}

.auth-form-section {
    background: #ffffff;
    position: relative;
}

/* Feature List */
.feature-list {
    max-width: 300px;
    margin: 0 auto;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.feature-item i {
    font-size: 1.5rem;
    margin-right: 1rem;
    width: 30px;
    text-align: center;
}

/* Login Form */
.auth-form-container {
    max-width: 400px;
    width: 100%;
    padding: 2rem;
}

.login-form {
    margin: 2rem 0;
}

/* Google Sign-in Button */
.btn-google {
    background: #ffffff;
    border: 2px solid #dadce0;
    color: #3c4043;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #c1c8cd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: #3c4043;
    text-decoration: none;
}

.btn-google:focus {
    box-shadow: 0 0 0 0.2rem rgba(66, 133, 244, 0.25);
}

.google-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
}

/* Divider */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 2rem 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #dadce0;
}

.auth-divider span {
    background: #ffffff;
    padding: 0 1rem;
    color: #5f6368;
    font-size: 0.875rem;
}

/* Guest Access */
.guest-access {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Legal Links */
.legal-links a {
    color: #1a73e8;
    text-decoration: none;
}

.legal-links a:hover {
    text-decoration: underline;
}

/* Terms Acceptance Page */
.terms-acceptance-body {
    background: #f8f9fa;
    min-height: 100vh;
}

.terms-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.terms-header {
    margin-bottom: 2rem;
}

.terms-header h1 {
    color: #1f2937;
    font-weight: 600;
}

/* Legal Document Cards */
.legal-document-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.legal-document-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.legal-document-card .card-header {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.25rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.legal-document-card .card-header h4 {
    margin: 0;
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
}

.version-badge {
    background: #dbeafe;
    color: #1e40af;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.legal-document-card .card-body {
    padding: 1.5rem;
}

/* Legal Content Preview */
.legal-content-preview {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    max-height: 200px;
    overflow-y: auto;
}

.legal-content-preview p {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    color: #374151;
}

.legal-content-preview p:last-child {
    margin-bottom: 0;
}

.read-more-indicator {
    border-top: 1px solid #e5e7eb;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}

.read-more-indicator a {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
}

.read-more-indicator a:hover {
    text-decoration: underline;
}

/* Form Controls */
.form-check {
    padding: 1rem;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.form-check:hover {
    border-color: #d1d5db;
}

.form-check-input:checked + .form-check-label {
    color: #059669;
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(34, 197, 94, 0.25);
    border-color: #10b981;
}

.form-check-label {
    font-weight: 500;
    line-height: 1.5;
}

.form-check-label a {
    color: #1a73e8;
    text-decoration: none;
}

.form-check-label a:hover {
    text-decoration: underline;
}

/* Action Buttons */
.terms-actions {
    margin: 2rem 0;
    padding: 2rem 0;
    border-top: 1px solid #e5e7eb;
}

.btn-primary.btn-lg {
    background: #059669;
    border-color: #059669;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary.btn-lg:hover:not(:disabled) {
    background: #047857;
    border-color: #047857;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(5, 150, 105, 0.3);
}

.btn-primary.btn-lg:disabled {
    background: #9ca3af;
    border-color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-outline-secondary.btn-lg {
    color: #6b7280;
    border-color: #d1d5db;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-outline-secondary.btn-lg:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #374151;
}

/* User Info Card */
.user-info .card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.user-info .card-body {
    padding: 1.5rem;
}

.user-info h6 {
    color: #374151;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.user-info .row {
    margin-bottom: 0.75rem;
}

.user-info .row:last-child {
    margin-bottom: 0;
}

/* Error Page */
.error-container {
    max-width: 500px;
    padding: 2rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.error-icon i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.error-help ul {
    text-align: left;
    display: inline-block;
}

.error-help li {
    display: flex;
    align-items: center;
}

.error-help i {
    margin-right: 0.5rem;
    width: 20px;
}

.error-actions .btn {
    margin: 0.25rem;
}

/* Profile Page */
.profile-placeholder {
    text-align: center;
    padding: 1rem;
}

.compliance-item {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #e5e7eb;
}

.compliance-item .badge {
    margin-left: 0.5rem;
}

.compliance-item small {
    margin-top: 0.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-branding {
        display: none;
    }

    .auth-form-container {
        padding: 1rem;
    }

    .terms-container {
        padding: 1rem;
    }

    .legal-document-card .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .legal-document-card .card-header h4 {
        margin-bottom: 0.5rem;
    }

    .terms-actions .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .error-container {
        margin: 1rem;
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .btn-google {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }

    .google-icon {
        width: 18px;
        height: 18px;
    }

    .feature-item {
        font-size: 1rem;
    }

    .legal-content-preview {
        font-size: 0.9rem;
        max-height: 150px;
    }

    .user-info .row {
        flex-direction: column;
    }

    .user-info .row > div {
        margin-bottom: 0.25rem;
    }
}

/* Loading States */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Focus States for Accessibility */
.btn:focus,
.form-check-input:focus,
.legal-document-card:focus-within {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .legal-document-card {
        border: 2px solid #000000;
    }

    .btn-google {
        border: 2px solid #000000;
    }

    .form-check {
        border: 2px solid #000000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}