/**
 * Cookie Consent Styles
 * Hurti Gruppe Design System
 */

/* Cookie Banner Base Styles */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 3px solid #e53e3e;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    font-family: system-ui, -apple-system, sans-serif;
}

.cookie-consent-banner.cookie-banner-show {
    transform: translateY(0);
}

.cookie-banner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

.cookie-banner-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2rem;
}

.cookie-banner-text {
    flex: 1;
    min-width: 300px;
}

.cookie-banner-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cookie-banner-title i {
    color: #e53e3e;
}

.cookie-banner-description {
    color: #4a5568;
    line-height: 1.5;
    margin: 0;
}

.cookie-link {
    color: #c53030;
    text-decoration: underline;
    transition: color 0.2s;
}

.cookie-link:hover {
    color: #9b2c2c;
}

.cookie-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Cookie Banner Buttons */
.btn-cookie-accept,
.btn-cookie-reject,
.btn-cookie-settings {
    padding: 0.625rem 1.25rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-cookie-accept {
    background: #c53030;
    color: white;
}

.btn-cookie-accept:hover {
    background: #9b2c2c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(197, 48, 48, 0.3);
}

.btn-cookie-reject {
    background: #e2e8f0;
    color: #2d3748;
}

.btn-cookie-reject:hover {
    background: #cbd5e0;
}

.btn-cookie-settings {
    background: transparent;
    color: #4a5568;
    border: 2px solid #cbd5e0;
}

.btn-cookie-settings:hover {
    background: #f7fafc;
    border-color: #a0aec0;
}

/* Cookie Settings Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.cookie-modal.modal-show {
    opacity: 1;
}

.cookie-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.cookie-modal-content {
    position: relative;
    background: white;
    border-radius: 0.75rem;
    max-width: 800px;
    max-height: 90vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: transform 0.3s;
}

.modal-show .cookie-modal-content {
    transform: scale(1);
}

.cookie-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookie-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cookie-modal-title i {
    color: #e53e3e;
}

.cookie-modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #718096;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.cookie-modal-close:hover {
    background: #f7fafc;
    color: #2d3748;
}

.cookie-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.cookie-modal-intro {
    margin-bottom: 2rem;
}

.cookie-modal-intro p {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.cookie-privacy-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #718096;
    font-size: 0.95rem;
}

.cookie-privacy-link i {
    color: #e53e3e;
}

.cookie-privacy-link a {
    color: #c53030;
    text-decoration: underline;
}

/* Cookie Categories */
.cookie-categories {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.cookie-category {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
}

.cookie-category-header {
    padding: 1rem;
    background: #f7fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-category-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex: 1;
}

.cookie-category-label input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    cursor: pointer;
}

.cookie-category-label input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.cookie-category-title {
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cookie-category-title i {
    color: #718096;
}

.cookie-badge {
    background: #48bb78;
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    margin-left: 0.5rem;
}

.cookie-category-toggle {
    background: transparent;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.cookie-category-toggle:hover {
    background: #e2e8f0;
}

.cookie-category-details {
    padding: 0 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.cookie-category-details.show {
    padding: 1rem;
    max-height: 500px;
}

.cookie-category-details p {
    color: #4a5568;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

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

.cookie-list li {
    color: #718096;
    padding: 0.25rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.cookie-list li:before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: #e53e3e;
}

.cookie-list strong {
    color: #4a5568;
}

.cookie-note {
    background: #fef5e7;
    border-left: 3px solid #f39c12;
    padding: 0.75rem;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #856404;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.cookie-note i {
    color: #f39c12;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

/* Company Info */
.cookie-company-info {
    background: #f7fafc;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1.5rem;
}

.cookie-company-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cookie-company-info h3 i {
    color: #e53e3e;
}

.cookie-company-info p {
    color: #4a5568;
    line-height: 1.6;
    margin: 0;
}

.cookie-company-info a {
    color: #c53030;
    text-decoration: none;
}

.cookie-company-info a:hover {
    text-decoration: underline;
}

/* Modal Footer */
.cookie-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.btn-cookie-primary,
.btn-cookie-secondary {
    padding: 0.625rem 1.25rem;
    border-radius: 0.375rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-cookie-primary {
    background: #c53030;
    color: white;
}

.btn-cookie-primary:hover {
    background: #9b2c2c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(197, 48, 48, 0.3);
}

.btn-cookie-secondary {
    background: transparent;
    color: #4a5568;
    border: 2px solid #cbd5e0;
}

.btn-cookie-secondary:hover {
    background: #f7fafc;
    border-color: #a0aec0;
}

/* Map Consent Placeholder */
.map-consent-placeholder {
    background: #f7fafc;
    border: 2px dashed #cbd5e0;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    position: relative;
}

.map-consent-content {
    text-align: center;
    padding: 2rem;
    max-width: 400px;
}

.map-consent-icon {
    font-size: 3rem;
    color: #cbd5e0;
    margin-bottom: 1rem;
}

.map-consent-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1rem;
}

.map-consent-text {
    color: #4a5568;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.map-consent-button {
    background: #c53030;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.map-consent-button:hover {
    background: #9b2c2c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(197, 48, 48, 0.3);
}

.map-consent-privacy {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.map-consent-privacy a {
    color: #c53030;
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .cookie-banner-text {
        min-width: auto;
    }
    
    .cookie-banner-actions {
        flex-direction: column;
    }
    
    .btn-cookie-accept,
    .btn-cookie-reject,
    .btn-cookie-settings {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    .cookie-modal-title {
        font-size: 1.25rem;
    }
    
    .cookie-modal-footer {
        flex-direction: column;
    }
    
    .btn-cookie-primary,
    .btn-cookie-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent-banner,
    .cookie-modal,
    .cookie-modal-content,
    .cookie-category-details {
        transition: none;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .cookie-consent-banner,
    .cookie-modal-content {
        background: #1a202c;
        color: #e2e8f0;
    }
    
    .cookie-banner-title,
    .cookie-modal-title,
    .cookie-category-title {
        color: #e2e8f0;
    }
    
    .cookie-banner-description,
    .cookie-modal-intro p,
    .cookie-category-details p {
        color: #a0aec0;
    }
    
    .cookie-category {
        border-color: #2d3748;
    }
    
    .cookie-category-header {
        background: #2d3748;
    }
    
    .btn-cookie-reject,
    .btn-cookie-settings,
    .btn-cookie-secondary {
        background: #2d3748;
        color: #e2e8f0;
        border-color: #4a5568;
    }
    
    .cookie-modal-overlay {
        background: rgba(0, 0, 0, 0.8);
    }
}

/* Body padding when banner is open */
body.cookie-banner-open {
    padding-bottom: 120px;
}

@media (max-width: 768px) {
    body.cookie-banner-open {
        padding-bottom: 240px;
    }
}