/* Component Styles for CycleCue Website */

/* FAQ Component */
.faq-container {
    margin: var(--spacing-lg) 0;
}

.faq-item {
    background: var(--surface);
    border: 1px solid rgba(233, 30, 99, 0.1);
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-sm);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-question {
    width: 100%;
    padding: var(--spacing-lg);
    background: none;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: var(--primary);
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.faq-answer {
    padding: 0 var(--spacing-lg);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 300px;
    padding: 0 var(--spacing-lg) var(--spacing-lg);
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

/* Notification Component */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--surface);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md) var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-width: 400px;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary);
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.notification-success {
    border-left-color: var(--success);
}

.notification.notification-error {
    border-left-color: var(--error);
}

.notification.notification-warning {
    border-left-color: var(--warning);
}

.notification.notification-info {
    border-left-color: var(--info);
}

.notification-message {
    margin-right: var(--spacing-md);
    flex: 1;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.notification-close:hover {
    color: var(--text-primary);
}

/* Cookie Consent Component */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid rgba(233, 30, 99, 0.1);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    padding: var(--spacing-lg);
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.cookie-consent.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-lg);
}

.cookie-text h4 {
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.cookie-text p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.cookie-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-shrink: 0;
}

.cookie-btn {
    padding: var(--spacing-xs) var(--spacing-md);
    border: 2px solid var(--primary);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cookie-btn.primary {
    background: var(--primary);
    color: var(--white);
}

.cookie-btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.cookie-btn.secondary {
    background: transparent;
    color: var(--primary);
}

.cookie-btn.secondary:hover {
    background: var(--primary);
    color: var(--white);
}

.cookie-btn.minimal {
    border: 1px solid var(--medium-gray);
    color: var(--text-secondary);
    background: transparent;
}

.cookie-btn.minimal:hover {
    background: var(--surface-variant);
    color: var(--text-primary);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Contact Form Component */
.contact-form-container {
    background: var(--surface);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(233, 30, 99, 0.1);
    box-shadow: var(--shadow-sm);
    margin: var(--spacing-lg) 0;
}

.contact-form .form-group {
    margin-bottom: var(--spacing-lg);
}

.contact-form label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--text-primary);
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: var(--spacing-md);
    border: 2px solid rgba(233, 30, 99, 0.2);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-family: inherit;
    background: var(--surface);
    color: var(--text-primary);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form .submit-btn {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 200px;
}

.contact-form .submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.contact-form .submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Cookie Table Styles */
.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-lg) 0;
    background: var(--surface);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.cookie-table th,
.cookie-table td {
    padding: var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid rgba(233, 30, 99, 0.1);
}

.cookie-table th {
    background: var(--gradient-card);
    font-weight: 600;
    color: var(--text-primary);
}

.cookie-table td {
    color: var(--text-secondary);
}

.cookie-table tr:hover {
    background: var(--surface-variant);
}

/* Navigation Scroll State */
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(233, 30, 99, 0.1);
}

/* Mobile Navigation Improvements */
@media (max-width: 768px) {
    .nav-menu.active {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
    }
    
    .cookie-content {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }
    
    .cookie-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .contact-form .submit-btn {
        max-width: none;
    }
    
    .nav-menu.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: var(--shadow-md);
        padding: var(--spacing-md);
        border-radius: 0 0 var(--border-radius-md) var(--border-radius-md);
        z-index: 1000;
    }
    
    .nav-menu.active .nav-link {
        padding: var(--spacing-sm) 0;
        text-align: center;
        border-bottom: 1px solid rgba(233, 30, 99, 0.1);
    }
    
    .nav-menu.active .nav-link:last-of-type {
        border-bottom: none;
    }
    
    .nav-menu.active .nav-buttons {
        flex-direction: column;
        gap: var(--spacing-sm);
        margin-top: var(--spacing-md);
        padding-top: var(--spacing-md);
        border-top: 1px solid rgba(233, 30, 99, 0.1);
    }
    
    .nav-menu.active .btn {
        width: 100%;
        text-align: center;
    }
}

/* Progress Indicator */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 1001;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 0.3s ease;
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--border-radius-sm);
}

.loading-text {
    height: 1em;
    margin-bottom: var(--spacing-xs);
}

.loading-title {
    height: 2em;
    width: 60%;
    margin-bottom: var(--spacing-md);
}

.loading-paragraph {
    height: 4em;
    margin-bottom: var(--spacing-md);
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Enhanced Button Styles */
.btn-enhanced {
    position: relative;
    overflow: hidden;
    transform: perspective(1px) translateZ(0);
}

.btn-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-enhanced:hover::before {
    left: 100%;
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .cookie-consent {
        border-top: 3px solid var(--primary);
    }
    
    .faq-item {
        border-width: 2px;
    }
    
    .notification {
        border-left-width: 6px;
    }
}

/* Dark Mode Support (Future Enhancement) */
@media (prefers-color-scheme: dark) {
    :root {
        --background: #1a1a1a;
        --surface: #2d2d2d;
        --surface-variant: #3d3d3d;
        --text-primary: #ffffff;
        --text-secondary: #b3b3b3;
    }
}