/**
 * Marketing Pro - Cookie Consent Banner Styles
 * Uses Marketing Pro design system colors and patterns
 */

/* CSS Variables - Marketing Pro Design System */
:root {
    --mp-consent-primary: #7cb82f;
    --mp-consent-primary-light: #a6e056;
    --mp-consent-primary-dark: #5a9a1f;
    --mp-consent-secondary: #43b2c6;
    --mp-consent-secondary-dark: #2a9bb0;
    --mp-consent-gray-50: #f8fafc;
    --mp-consent-gray-100: #f1f5f9;
    --mp-consent-gray-200: #e2e8f0;
    --mp-consent-gray-300: #cbd5e1;
    --mp-consent-gray-400: #94a3b8;
    --mp-consent-gray-500: #64748b;
    --mp-consent-gray-600: #475569;
    --mp-consent-gray-700: #334155;
    --mp-consent-gray-800: #1e293b;
    --mp-consent-radius: 0.5rem;
    --mp-consent-radius-lg: 0.75rem;
    --mp-consent-radius-xl: 1rem;
    --mp-consent-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --mp-consent-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --mp-consent-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.mp-consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mp-consent-banner.mp-consent-visible {
    opacity: 1;
}

/* Position Variants */
.mp-consent-bottom {
    bottom: 0;
    transform: translateY(100%);
}

.mp-consent-bottom.mp-consent-visible {
    transform: translateY(0);
}

.mp-consent-top {
    top: 0;
    transform: translateY(-100%);
}

.mp-consent-top.mp-consent-visible {
    transform: translateY(0);
}

.mp-consent-popup {
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transform: scale(0.95);
}

.mp-consent-popup.mp-consent-visible {
    transform: scale(1);
}

.mp-consent-popup .mp-consent-container {
    max-width: 520px;
    margin: 20px;
    border-radius: var(--mp-consent-radius-xl);
    box-shadow: var(--mp-consent-shadow-xl);
    overflow: hidden;
}

/* Container */
.mp-consent-container {
    background-color: var(--mp-consent-bg, #ffffff);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
}

.mp-consent-top .mp-consent-container {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.mp-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 32px;
}

/* Header with gradient accent */
.mp-consent-header {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid transparent;
    background: linear-gradient(var(--mp-consent-bg, #ffffff), var(--mp-consent-bg, #ffffff)) padding-box,
                linear-gradient(135deg, var(--mp-consent-primary-light), var(--mp-consent-primary), var(--mp-consent-secondary)) border-box;
    border-image-slice: 1;
}

.mp-consent-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--mp-consent-gray-800);
    display: flex;
    align-items: center;
    gap: 10px;
}

.mp-consent-title::before {
    content: '\f564';
    font-family: 'Font Awesome 5 Free', 'Font Awesome 6 Free', 'Font Awesome 7 Free', 'FontAwesome';
    font-weight: 900;
    font-size: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--mp-consent-primary) 0%, var(--mp-consent-secondary) 100%);
    color: #fff;
    border-radius: 6px;
    flex-shrink: 0;
}

/* Body */
.mp-consent-body {
    margin-bottom: 20px;
}

.mp-consent-text {
    margin: 0 0 18px 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--mp-consent-gray-600);
}

/* Categories - collapsible */
.mp-consent-categories {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--mp-consent-gray-200);
}

.mp-consent-categories.mp-consent-expanded {
    display: flex;
}

.mp-consent-category {
    padding: 12px 16px;
    background: var(--mp-consent-gray-50);
    border: 1px solid var(--mp-consent-gray-200);
    border-radius: var(--mp-consent-radius);
    transition: all 0.2s ease;
}

.mp-consent-category:has(input:checked) {
    background: rgba(124, 184, 47, 0.08);
    border-color: var(--mp-consent-primary);
}

.mp-consent-category:has(input:disabled) {
    opacity: 0.85;
}

.mp-consent-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mp-consent-category-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.mp-consent-category-toggle:has(input:disabled) {
    cursor: not-allowed;
}

.mp-consent-category-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0 10px 0 0;
    cursor: pointer;
    accent-color: var(--mp-consent-primary);
    border-radius: 4px;
}

.mp-consent-category-toggle input[type="checkbox"]:disabled {
    cursor: not-allowed;
}

.mp-consent-category-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--mp-consent-gray-700);
}

.mp-consent-category-desc {
    margin: 6px 0 0 28px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--mp-consent-gray-500);
}

/* Actions */
.mp-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid var(--mp-consent-gray-200);
}

.mp-consent-btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: var(--mp-consent-radius);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mp-consent-btn-accept {
    background: linear-gradient(135deg, var(--mp-consent-primary) 0%, var(--mp-consent-secondary) 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(124, 184, 47, 0.3);
}

.mp-consent-btn-accept:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 184, 47, 0.4);
}

.mp-consent-btn-accept:active {
    transform: translateY(0);
}

.mp-consent-btn-decline {
    background-color: transparent;
    color: var(--mp-consent-gray-600);
    border: 1px solid var(--mp-consent-gray-300);
}

.mp-consent-btn-decline:hover {
    background-color: var(--mp-consent-gray-100);
    border-color: var(--mp-consent-gray-400);
    color: var(--mp-consent-gray-700);
}

.mp-consent-btn-settings {
    background-color: transparent;
    color: var(--mp-consent-secondary);
    border: 1px solid var(--mp-consent-secondary);
}

.mp-consent-btn-settings:hover {
    background-color: var(--mp-consent-secondary);
    color: #fff;
}

/* Save button - hidden by default, shown when categories expanded */
.mp-consent-btn-save {
    display: none;
    background-color: transparent;
    color: var(--mp-consent-primary);
    border: 2px solid var(--mp-consent-primary);
}

.mp-consent-btn-save:hover {
    background: linear-gradient(135deg, var(--mp-consent-primary) 0%, var(--mp-consent-secondary) 100%);
    border-color: transparent;
    color: #fff;
}

/* When expanded: show Save, hide Settings */
.mp-consent-banner.mp-consent-details-open .mp-consent-btn-settings {
    display: none;
}

.mp-consent-banner.mp-consent-details-open .mp-consent-btn-save {
    display: inline-block;
}

/* Responsive */
@media (max-width: 768px) {
    .mp-consent-content {
        padding: 20px;
    }

    .mp-consent-title {
        font-size: 18px;
    }

    .mp-consent-title::before {
        font-size: 16px;
        width: 28px;
        height: 28px;
    }

    .mp-consent-text {
        font-size: 13px;
    }

    .mp-consent-categories {
        gap: 8px;
    }

    .mp-consent-category {
        padding: 10px 12px;
    }

    .mp-consent-category-label {
        font-size: 13px;
    }

    .mp-consent-category-desc {
        font-size: 12px;
        margin-left: 28px;
    }

    .mp-consent-actions {
        justify-content: stretch;
    }

    .mp-consent-btn {
        flex: 1;
        min-width: calc(50% - 5px);
        padding: 14px 16px;
        font-size: 13px;
    }

    .mp-consent-btn-accept {
        order: -1;
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .mp-consent-content {
        padding: 16px;
    }

    .mp-consent-category-desc {
        margin-left: 0;
        margin-top: 8px;
    }

    .mp-consent-btn {
        min-width: 100%;
    }
}