/* Component Styles */

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-family: inherit; /* inherits Garamond site-wide */
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: #3498db;
    border: 2px solid #3498db;
}

.btn-secondary:hover {
    background: #3498db;
    color: white;
}

.btn-logout {
    background: #e74c3c;
    color: white;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn-logout:hover {
    background: #d84a3a; /* slightly softer shift */
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.2);
}

/* Celestial variant buttons on dark hero */
.celestial .btn-primary {
    background: transparent;
    color: var(--celestial-primary);
    border: 1px solid var(--celestial-line);
}

.celestial .btn-primary:hover {
    background: rgba(255,255,255,0.08);
    transform: translateY(-2px);
}

.celestial .btn-secondary {
    background: transparent;
    color: var(--celestial-primary);
    border: 1px solid var(--celestial-line);
}

.celestial .btn-secondary:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

/* Forms */
.auth-form {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

.form-group input:invalid {
    border-color: #e74c3c;
}

.auth-switch {
    text-align: center;
    margin-top: 1rem;
    color: #666;
}

.auth-switch a {
    color: #3498db;
    text-decoration: none;
}

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

/* Dashboard Components */
.dashboard-welcome {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 3rem;
}

.dashboard-welcome h3 {
    color: white;
    margin-bottom: 0.5rem;
}

.dashboard-welcome p {
    color: rgba(255,255,255,0.9);
    margin: 0;
}

.dashboard-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.action-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.action-card:hover {
    transform: translateY(-5px);
}

.action-card h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.action-card p {
    color: #666;
    margin-bottom: 1.5rem;
}

/* Alert Components */
.alert {
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Progress Indicators */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Form Validation */
.form-group.error input {
    border-color: #e74c3c;
}

.form-group.success input {
    border-color: #27ae60;
}

.error-message {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.success-message {
    color: #27ae60;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .auth-form {
        margin: 0 15px;
        padding: 1.5rem;
    }
    
    .dashboard-actions {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .action-card {
        padding: 1.5rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .hero-actions .btn {
        width: auto;
        margin-bottom: 0;
    }
}

/* Accessibility */
.btn:focus,
.form-group input:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #000;
        border: 2px solid #000;
    }
    
    .btn-secondary {
        background: #fff;
        color: #000;
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .btn,
    .form-group input,
    .action-card,
    .loading-spinner {
        transition: none;
        animation: none;
    }
}

/* Personal Details Form Styles */
.personal-details-form {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Wishes Form Styles */
.wishes-form {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Slightly tighter sections for wishes pages */
.wishes-form .form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
}

@media (max-width: 768px) {
    .wishes-form {
        margin: 0 15px;
        padding: 1.5rem;
    }
    .wishes-form .form-group .form-row {
        gap: 0.5rem;
    }
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.page-header p {
    color: #666;
    margin-bottom: 2rem;
}

.progress-container {
    max-width: 400px;
    margin: 0 auto 2rem;
}

.progress-text {
    display: block;
    text-align: center;
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.5rem;
}

.save-indicator {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-align: center;
    margin-bottom: 1rem;
}

.save-indicator.saved {
    background: #d4edda;
    color: #155724;
}

.save-indicator.unsaved {
    background: #fff3cd;
    color: #856404;
}

.save-indicator.error {
    background: #f8d7da;
    color: #721c24;
}

.form-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 2rem;
}

.form-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.form-section-description {
    color: #666;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit; /* inherits Garamond site-wide */
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-group input:invalid {
    border-color: #e74c3c;
}

.form-help {
    display: block;
    font-size: 0.75rem;
    color: #999;
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.form-actions .btn {
    min-width: 150px;
}

/* Responsive adjustments for personal details form */
@media (max-width: 768px) {
    .personal-details-form {
        margin: 0 15px;
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .form-actions .btn {
        width: 100%;
        min-width: auto;
    }
    
    .page-header {
        margin-bottom: 2rem;
    }
    
    .form-section {
        margin-bottom: 2rem;
    }
}

/* About Page Styles */
.about-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.about-content h3 {
    color: #1a3a5f;
    margin-bottom: 1rem;
    font-family: 'EB Garamond', serif;
    font-weight: 600;
}

.about-values ul {
    list-style-type: none;
    padding-left: 0;
}

.about-values li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.about-values li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #5d8aa8;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.feature {
    background-color: #f7f9fc;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.feature h4 {
    color: #1a3a5f;
    margin-top: 0;
    font-family: 'EB Garamond', serif;
}

.about-cta {
    text-align: center;
    background-color: #f0f4f8;
    padding: 2rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.about-cta .btn {
    margin-top: 1rem;
}
