/* Common Components CSS */

/* Header Styles */
.header {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo i {
    font-size: 1.8rem;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.nav-link:hover {
    opacity: 0.8;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Footer Styles */
.footer {
    background-color: #1e293b;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin: 0 0 1rem 0;
    color: #059669;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-section .logo {
    margin-bottom: 1rem;
}

.footer-section .logo i {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: #374151;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.social-link:hover {
    background-color: #059669;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    text-align: center;
    color: #94a3b8;
}

/* Overlay Styles */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.overlay-header h2 {
    margin: 0;
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    padding: 0.25rem;
    line-height: 1;
}

.close-btn:hover {
    color: #1e293b;
}

.btn-full {
    width: 100%;
}

.form-footer {
    text-align: center;
    margin-top: 1rem;
}

.form-footer p {
    margin: 0.5rem 0;
    color: #64748b;
}

.form-footer a {
    color: #059669;
    text-decoration: none;
}

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

/* Message Container */
.message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    max-width: 400px;
}

.message-content {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #059669;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.message-content.error {
    border-left-color: #dc2626;
}

.message-content p {
    margin: 0;
    color: #1e293b;
}

/* Read-only Field Styles */
.readonly-field {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.75rem;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: capitalize;
}

.status-verified {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-unverified {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Invitation status badges */
.status-pending {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.status-accepted {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-expired {
    background-color: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.status-cancelled {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Invitation actions */
.invitation-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-cancel-invitation {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s;
}

.btn-cancel-invitation:hover {
    background: #dc2626;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-list {
        gap: 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .overlay-content {
        margin: 1rem;
        padding: 1.5rem;
    }
}

/* Legal Pages Styles */
.legal-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
    line-height: 1.7;
}

.legal-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #e5e7eb;
}

.legal-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.legal-subtitle {
    color: #6b7280;
    font-size: 1.1rem;
    font-weight: 500;
}

.legal-content {
    color: #374151;
}

.legal-section {
    margin-bottom: 2.5rem;
}

.legal-section h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.legal-section h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #374151;
    margin: 1.5rem 0 0.8rem 0;
}

.legal-section p {
    margin-bottom: 1rem;
    text-align: justify;
}

.legal-section ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.legal-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.legal-section strong {
    font-weight: 600;
    color: #1f2937;
}

.contact-info {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
    margin: 1.5rem 0;
}

.contact-info p {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.contact-info strong {
    color: #2563eb;
}

/* Responsive Design for Legal Pages */
@media (max-width: 768px) {
    .legal-page {
        padding: 1rem 0;
    }
    
    .legal-header h1 {
        font-size: 2rem;
    }
    
    .legal-section h2 {
        font-size: 1.5rem;
    }
    
    .legal-section h3 {
        font-size: 1.2rem;
    }
    
    .contact-info {
        padding: 1rem;
    }
}

/* Terms of Service Checkbox Styles */
.checkbox-group {
    margin: 1.5rem 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #374151;
}

.checkbox-text {
    flex: 1;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #2563eb;
}

.terms-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.terms-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.terms-link:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Error state for checkbox */
.checkbox-label.error input[type="checkbox"] {
    accent-color: #dc2626;
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

.checkbox-label.error .terms-link {
    color: #dc2626;
}

/* Responsive design for checkbox */
@media (max-width: 768px) {
    .checkbox-label {
        font-size: 0.85rem;
        gap: 0.5rem;
    }
    
    .checkbox-label input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }
}

/* Project Creation Overlay Styles */
#projectCreationOverlay .overlay-content {
    max-width: 500px;
}

#projectCreationOverlay .form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    background-color: white;
    transition: border-color 0.2s ease;
}

#projectCreationOverlay .form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#projectCreationOverlay .form-group textarea {
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s ease;
}

#projectCreationOverlay .form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Application Confirmation Overlay Styles */
#applicationConfirmationOverlay .overlay-content {
    max-width: 450px;
    text-align: center;
}

.confirmation-content .success-icon {
    font-size: 3rem;
    color: #10b981;
    margin-bottom: 1rem;
}

.confirmation-content p {
    margin-bottom: 1rem;
    color: #6b7280;
    line-height: 1.5;
}

.confirmation-content p:first-of-type {
    color: #374151;
    font-weight: 500;
    font-size: 1.125rem;
}

.confirmation-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.confirmation-actions .btn {
    min-width: 120px;
}

@media (max-width: 768px) {
    .confirmation-actions {
        flex-direction: column;
    }
    
    .confirmation-actions .btn {
        width: 100%;
    }
    
    #projectCreationOverlay .overlay-content {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
}

/* Existing User Dialog Styles */
#existingUserOverlay .overlay-content {
    max-width: 450px;
    text-align: center;
}

.existing-user-content .warning-icon {
    font-size: 3rem;
    color: #f59e0b;
    margin-bottom: 1rem;
}

.existing-user-content p {
    margin-bottom: 1rem;
    color: #6b7280;
    line-height: 1.5;
}

.existing-user-content p:first-of-type {
    color: #374151;
    font-weight: 500;
    font-size: 1.125rem;
}

.existing-user-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.existing-user-actions .btn {
    min-width: 120px;
}

@media (max-width: 768px) {
    .existing-user-actions {
        flex-direction: column;
    }
    
    .existing-user-actions .btn {
        width: 100%;
    }
}

/* Error Dialog Styles */
#errorOverlay .overlay-content {
    max-width: 450px;
    text-align: center;
}

.error-content .error-icon {
    font-size: 3rem;
    color: #dc2626;
    margin-bottom: 1rem;
}

.error-content p {
    margin-bottom: 1.5rem;
    color: #374151;
    line-height: 1.5;
    font-size: 1rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.error-actions .btn {
    min-width: 120px;
}

@media (max-width: 768px) {
    .error-actions {
        flex-direction: column;
    }
    
    .error-actions .btn {
        width: 100%;
    }
}

/* Cancel Dialog Styles */
#cancelOverlay .overlay-content {
    max-width: 450px;
    text-align: center;
}

.cancel-content .warning-icon {
    font-size: 3rem;
    color: #f59e0b;
    margin-bottom: 1rem;
}

.cancel-content p {
    margin-bottom: 1.5rem;
    color: #374151;
    line-height: 1.5;
    font-size: 1rem;
}

.cancel-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.cancel-actions .btn {
    min-width: 140px;
}

.cancel-actions .btn-danger {
    background-color: #dc2626;
    color: white;
    border-color: #dc2626;
}

.cancel-actions .btn-danger:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
}

@media (max-width: 768px) {
    .cancel-actions {
        flex-direction: column;
    }
    
    .cancel-actions .btn {
        width: 100%;
    }
}

/* Form Actions Styles */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
    .form-actions {
        flex-direction: column-reverse;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

/* Overlay Subtitle Styles */
.overlay-subtitle {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.overlay-subtitle p {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

/* Project Creation Form Styles */
.category-display {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 0.5rem;
}

.category-info strong {
    color: #1e293b;
    font-size: 1rem;
}

.category-info p {
    color: #64748b;
    font-size: 0.875rem;
    margin: 0.5rem 0 0 0;
}

.checkbox-group {
    margin: 1rem 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.terms-content {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.terms-text h4 {
    margin: 0 0 0.5rem 0;
    color: #1e293b;
    font-size: 0.875rem;
    font-weight: 600;
}

.terms-body {
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.4;
    white-space: pre-wrap;
}
