/* Cookie Consent Styling for MyMoodMates */
/* GDPR Compliant Cookie Notice */

/* Cookie Banner (Simple notification) */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-top: 3px solid var(--primary-color, #ff9900);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    padding: 20px;
    animation: slideUp 0.4s ease-out;
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-banner-text {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    font-size: 14px;
    color: #333;
}

.cookie-banner-text i {
    color: var(--primary-color, #ff9900);
    font-size: 18px;
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

/* Cookie Consent Modal */
.cookie-consent {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.cookie-consent-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.cookie-consent-modal {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    animation: slideInUp 0.4s ease-out;
}

.cookie-consent-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 30px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.cookie-consent-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-consent-header i {
    color: var(--primary-color, #ff9900);
}

.cookie-consent-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #6b7280;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.cookie-consent-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #374151;
}

.cookie-consent-content {
    padding: 30px;
    max-height: calc(90vh - 140px);
    overflow-y: auto;
}

.cookie-consent-intro {
    margin-bottom: 30px;
}

.cookie-consent-intro p {
    margin: 0 0 15px 0;
    line-height: 1.6;
    color: #4b5563;
}

.cookie-consent-intro p:last-child {
    margin-bottom: 0;
}

/* Cookie Categories */
.cookie-categories {
    margin-bottom: 30px;
}

.cookie-category {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.cookie-category:hover {
    border-color: var(--primary-color, #ff9900);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.1);
}

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: #f9fafb;
    cursor: pointer;
}

.cookie-category-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    margin-right: 15px;
}

.cookie-category-title h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-category-title i {
    color: var(--primary-color, #ff9900);
}

.cookie-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cookie-status.essential {
    background: #dcfce7;
    color: #166534;
}

/* Cookie Switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .cookie-slider {
    background-color: var(--primary-color, #ff9900);
}

input:checked + .cookie-slider:before {
    transform: translateX(26px);
}

.cookie-toggle-info {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.cookie-toggle-info:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #374151;
}

.cookie-toggle-info i {
    transition: transform 0.2s ease;
}

.cookie-toggle-info.active i {
    transform: rotate(180deg);
}

/* Cookie Category Info */
.cookie-category-info {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
}

.cookie-category-info.active {
    padding: 20px;
    max-height: 500px;
}

.cookie-category-info p {
    margin: 0 0 15px 0;
    color: #6b7280;
    line-height: 1.6;
}

.cookie-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cookie-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
    color: #4b5563;
    font-size: 14px;
}

.cookie-list li:last-child {
    border-bottom: none;
}

.cookie-list li strong {
    color: #1f2937;
}

/* Cookie Consent Footer */
.cookie-consent-footer {
    border-top: 1px solid #e5e7eb;
    padding: 24px 30px;
    background: #f9fafb;
}

.cookie-consent-links {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.cookie-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-color, #ff9900);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.cookie-link:hover {
    color: #e68900;
    text-decoration: underline;
}

.cookie-consent-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.cookie-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.cookie-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Cookie Settings Button */
.cookie-settings-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9998;
}

.cookie-settings-button button {
    background: var(--primary-color, #ff9900);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255, 153, 0, 0.3);
    transition: all 0.3s ease;
    font-size: 18px;
}

.cookie-settings-button button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 153, 0, 0.4);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .cookie-banner-actions {
        justify-content: center;
    }
    
    .cookie-consent {
        padding: 10px;
    }
    
    .cookie-consent-modal {
        max-height: 95vh;
    }
    
    .cookie-consent-header {
        padding: 20px;
    }
    
    .cookie-consent-content {
        padding: 20px;
    }
    
    .cookie-consent-footer {
        padding: 20px;
    }
    
    .cookie-consent-links {
        justify-content: center;
        text-align: center;
    }
    
    .cookie-consent-actions {
        justify-content: center;
    }
    
    .cookie-btn {
        flex: 1;
        min-width: 120px;
    }
    
    .cookie-category-header {
        padding: 15px;
    }
    
    .cookie-category-info.active {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .cookie-consent-actions {
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-settings-button {
        bottom: 15px;
        right: 15px;
    }
    
    .cookie-settings-button button {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

/* Theme Support */
.theme-young .cookie-consent-modal {
    border: 3px solid var(--primary-color, #ff9900);
}

.theme-young .cookie-category:hover {
    border-color: var(--secondary-color, #4ECDC4);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.1);
}

/* Dark Mode Support (if implemented) */
@media (prefers-color-scheme: dark) {
    .cookie-consent-modal {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .cookie-consent-header {
        background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
        border-bottom-color: #4b5563;
    }
    
    .cookie-consent-header h3 {
        color: #f9fafb;
    }
    
    .cookie-category {
        border-color: #4b5563;
        background: #374151;
    }
    
    .cookie-category-header {
        background: #4b5563;
    }
    
    .cookie-category-title h4 {
        color: #f9fafb;
    }
    
    .cookie-consent-footer {
        background: #374151;
        border-top-color: #4b5563;
    }
    
    .cookie-banner {
        background: rgba(31, 41, 55, 0.98);
        color: #f9fafb;
    }
}

/* Accessibility */
.cookie-consent *:focus {
    outline: 2px solid var(--primary-color, #ff9900);
    outline-offset: 2px;
}

.cookie-consent button:focus,
.cookie-consent a:focus {
    outline: 2px solid var(--primary-color, #ff9900);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .cookie-consent-modal {
        border: 2px solid #000;
    }
    
    .cookie-category {
        border: 2px solid #000;
    }
    
    .cookie-btn {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent,
    .cookie-banner,
    .cookie-consent-modal,
    .cookie-category,
    .cookie-toggle-info i,
    .cookie-category-info,
    .cookie-btn,
    .cookie-settings-button button {
        animation: none;
        transition: none;
    }
}
