/**
 * Cookie Banner Styles
 * Monroeareb - Marketing Editorial Platform
 * GDPR-compliant cookie consent banner
 */

/* ==================== Cookie Banner ==================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1f3a 0%, #2d3561 100%);
    color: #ffffff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    border-top: 3px solid #3b82f6;
}

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

.cookie-banner-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.cookie-banner-content {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex: 1;
}

.cookie-banner-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
}

.cookie-banner-icon svg {
    width: 28px;
    height: 28px;
}

.cookie-banner-text {
    flex: 1;
}

.cookie-banner-text h4 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #ffffff;
}

.cookie-banner-text p {
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

.cookie-banner-text a {
    color: #60a5fa;
    text-decoration: underline;
    transition: color 0.2s;
}

.cookie-banner-text a:hover {
    color: #93c5fd;
}

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

/* ==================== Cookie Buttons ==================== */
.cookie-btn {
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: inherit;
}

.cookie-btn-primary {
    background: #3b82f6;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.cookie-btn-primary:hover {
    background: #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.cookie-btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

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

/* ==================== Cookie Modal ==================== */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

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

.cookie-modal-content {
    background: #ffffff;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

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

.cookie-modal-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #1a1f3a;
}

.cookie-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-modal-close:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.cookie-modal-body {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
}

.cookie-category {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.cookie-category:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

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

.cookie-category-header h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1f3a;
}

.cookie-category-header p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
}

/* ==================== Cookie Toggle Switch ==================== */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.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: 26px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    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-switch input:checked + .cookie-slider {
    background-color: #3b82f6;
}

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

.cookie-switch input:disabled + .cookie-slider {
    background-color: #94a3b8;
    cursor: not-allowed;
}

.cookie-modal-footer {
    padding: 20px 28px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: #f9fafb;
    border-radius: 0 0 16px 16px;
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
    .cookie-banner-container {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        gap: 20px;
    }

    .cookie-banner-content {
        flex-direction: column;
        gap: 16px;
    }

    .cookie-banner-icon {
        width: 40px;
        height: 40px;
    }

    .cookie-banner-icon svg {
        width: 24px;
        height: 24px;
    }

    .cookie-banner-text h4 {
        font-size: 16px;
    }

    .cookie-banner-text p {
        font-size: 13px;
    }

    .cookie-banner-actions {
        flex-direction: column;
        width: 100%;
    }

    .cookie-btn {
        width: 100%;
        padding: 12px 20px;
    }

    .cookie-modal-content {
        max-height: 90vh;
        margin: 10px;
    }

    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding: 20px;
    }

    .cookie-modal-header h3 {
        font-size: 18px;
    }

    .cookie-modal-footer {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .cookie-banner-container {
        padding: 16px;
    }

    .cookie-banner-text h4 {
        font-size: 15px;
    }

    .cookie-banner-text p {
        font-size: 12px;
    }

    .cookie-btn {
        font-size: 13px;
        padding: 10px 18px;
    }

    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding: 16px;
    }
}

/* ==================== Print Styles ==================== */
@media print {
    .cookie-banner,
    .cookie-modal {
        display: none !important;
    }
}
