/* ============================================================
   COOKIES BANNER STYLES
   CreaSoft Corp - POS Complete
============================================================ */

/* ===== Banner Container ===== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

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

.cookie-banner.closing {
    transform: translateY(100%);
}

.cookie-banner-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: -1;
}

.cookie-banner-container {
    background: white;
    border-top: 3px solid;
    border-image: linear-gradient(90deg, #1e40af, #3b82f6, #facc15) 1;
    box-shadow: 0 -10px 60px rgba(0, 0, 0, 0.15);
    max-height: 90vh;
    overflow-y: auto;
}

.cookie-banner-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* ===== Cookie Icon ===== */
.cookie-banner-icon {
    display: none;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    border-radius: 16px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    font-size: 1.75rem;
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.2);
}

@media (min-width: 768px) {
    .cookie-banner-icon {
        display: flex;
    }
}

/* ===== Text Content ===== */
.cookie-banner-text {
    flex: 1;
    min-width: 280px;
}

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

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

.cookie-banner-description {
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.cookie-banner-link {
    font-size: 0.75rem;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.3s;
}

.cookie-banner-link:hover {
    color: #1e40af;
    text-decoration: underline;
}

/* ===== Action Buttons ===== */
.cookie-banner-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
    min-width: 180px;
}

@media (min-width: 640px) {
    .cookie-banner-actions {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }
}

/* ===== Cookie Buttons ===== */
.cookie-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    line-height: 1.4;
}

.cookie-btn:hover {
    transform: translateY(-1px);
}

.cookie-btn:active {
    transform: translateY(0);
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

.cookie-btn-accept:hover {
    box-shadow: 0 6px 25px rgba(30, 64, 175, 0.4);
}

.cookie-btn-essential {
    background: #f1f5f9;
    color: #374151;
    border: 1px solid #e2e8f0;
}

.cookie-btn-essential:hover {
    background: #e2e8f0;
}

.cookie-btn-settings {
    background: transparent;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.cookie-btn-settings:hover {
    background: #f9fafb;
    color: #374151;
    border-color: #9ca3af;
}

.cookie-btn-reject {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

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

/* ===== Settings Panel ===== */
.cookie-settings-panel {
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
}

.cookie-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    border-bottom: 1px solid #e5e7eb;
    max-width: 1280px;
    margin: 0 auto;
}

.cookie-settings-header h4 {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cookie-settings-header h4 i {
    color: #3b82f6;
}

.cookie-settings-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #e5e7eb;
    border-radius: 8px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s;
}

.cookie-settings-close:hover {
    background: #d1d5db;
    color: #111827;
}

.cookie-settings-body {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.cookie-settings-footer {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* ===== Cookie Category ===== */
.cookie-category {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s;
}

.cookie-category:hover {
    border-color: #93c5fd;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
}

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

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-category-info {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex: 1;
    min-width: 200px;
}

.cookie-category-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.cookie-category-icon.essential {
    background: #dbeafe;
    color: #1e40af;
}

.cookie-category-icon.analytics {
    background: #d1fae5;
    color: #059669;
}

.cookie-category-icon.marketing {
    background: #fef3c7;
    color: #d97706;
}

.cookie-category-icon.functional {
    background: #ede9fe;
    color: #7c3aed;
}

.cookie-category-info h5 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.cookie-category-info p {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.5;
}

/* ===== Toggle Switch ===== */
.cookie-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    flex-shrink: 0;
}

.cookie-toggle.disabled {
    cursor: default;
    opacity: 0.7;
}

.cookie-toggle input {
    display: none;
}

.cookie-toggle-slider {
    width: 44px;
    height: 24px;
    background: #d1d5db;
    border-radius: 9999px;
    position: relative;
    transition: background 0.3s;
}

.cookie-toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: #3b82f6;
}

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

.cookie-toggle.disabled .cookie-toggle-slider {
    background: #93c5fd;
}

.cookie-toggle.disabled .cookie-toggle-slider::after {
    transform: translateX(20px);
}

.cookie-toggle-label {
    font-size: 0.6875rem;
    color: #9ca3af;
    font-weight: 500;
    white-space: nowrap;
}

/* ===== Responsive ===== */
@media (max-width: 639px) {
    .cookie-banner-content {
        padding: 1.25rem 1rem;
        gap: 1rem;
    }

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

    .cookie-btn {
        width: 100%;
        padding: 0.75rem 1rem;
    }

    .cookie-settings-header,
    .cookie-settings-body,
    .cookie-settings-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-toggle {
        align-self: flex-end;
    }

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

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