/**
 * GDPR Cookie Consent Banner Styles
 * Fuji 9 LLC - SEO for Roofers
 */

/* Cookie Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1F2937 0%, #374151 100%);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
    padding: 20px;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    border-top: 3px solid #DC2626;
}

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

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

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

.cookie-consent-text h3 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.cookie-consent-text p {
    color: #D1D5DB;
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
}

.cookie-consent-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 14px 28px;
    min-height: 48px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cookie-btn-primary {
    background: #DC2626;
    color: #ffffff;
}

.cookie-btn-primary:hover {
    background: #B91C1C;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

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

.cookie-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cookie-btn-text {
    background: transparent;
    color: #D1D5DB;
    text-decoration: underline;
}

.cookie-btn-text:hover {
    color: #ffffff;
}

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

.cookie-consent-modal.cookie-modal-visible {
    opacity: 1;
}

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

.cookie-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

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

.cookie-modal-header {
    padding: 24px 24px 16px;
    border-bottom: 2px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookie-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #1F2937;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #6B7280;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    min-width: 48px;
    min-height: 48px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.cookie-modal-close:hover {
    background: #F3F4F6;
    color: #1F2937;
}

.cookie-modal-body {
    padding: 24px;
}

.cookie-modal-intro {
    color: #6B7280;
    font-size: 14px;
    margin: 0 0 24px 0;
    line-height: 1.6;
}

.cookie-category {
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: border-color 0.2s ease;
}

.cookie-category:hover {
    border-color: #DC2626;
}

.cookie-category-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.cookie-category-title {
    flex: 1;
}

.cookie-category-title h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 700;
    color: #1F2937;
}

.cookie-required {
    display: inline-block;
    background: #DC2626;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cookie-category-desc {
    color: #6B7280;
    font-size: 13px;
    margin: 0 0 8px 0;
    line-height: 1.6;
}

.cookie-tools {
    color: #9CA3AF;
    font-size: 12px;
    margin: 0;
}

.cookie-tools strong {
    color: #6B7280;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    flex-shrink: 0;
}

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

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

.cookie-toggle-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);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #DC2626;
}

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

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-modal-footer {
    padding: 16px 24px 24px;
    border-top: 2px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.cookie-privacy-link {
    color: #6B7280;
    font-size: 14px;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.cookie-privacy-link:hover {
    color: #DC2626;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-consent-text {
        text-align: center;
    }

    .cookie-consent-buttons {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
        text-align: center;
    }

    .cookie-modal-content {
        margin: 0;
        border-radius: 12px;
    }

    .cookie-modal-footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .cookie-modal-footer .cookie-btn {
        width: 100%;
    }

    .cookie-privacy-link {
        text-align: center;
    }
}

/* Accessibility */
.cookie-btn:focus,
.cookie-modal-close:focus,
.cookie-toggle input:focus + .cookie-toggle-slider {
    outline: 2px solid #DC2626;
    outline-offset: 2px;
}

/* Smooth scrollbar for modal */
.cookie-modal-content::-webkit-scrollbar {
    width: 8px;
}

.cookie-modal-content::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 4px;
}

.cookie-modal-content::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 4px;
}

.cookie-modal-content::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}
