/* Cookie Consent ES - Styles */

/* Overlay */
.cces-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Banner */
.cces-banner {
    width: 100%;
    max-width: 820px;
    background: #fff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
    padding: 0;
    animation: cces-slide-up 0.35s ease-out;
}

@keyframes cces-slide-up {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.cces-banner-inner {
    padding: 28px 32px 24px;
}

.cces-text h3 {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
}

.cces-text p {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #4a4a5a;
}

.cces-text a {
    color: #2563eb;
    text-decoration: underline;
}

/* Buttons */
.cces-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cces-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
}

.cces-btn:active {
    transform: scale(0.97);
}

.cces-btn-accept {
    background: #2563eb;
    color: #fff;
}

.cces-btn-accept:hover {
    background: #1d4ed8;
}

.cces-btn-reject {
    background: #e5e7eb;
    color: #1a1a2e;
}

.cces-btn-reject:hover {
    background: #d1d5db;
}

.cces-btn-settings {
    background: transparent;
    color: #2563eb;
    border: 1.5px solid #2563eb;
}

.cces-btn-settings:hover {
    background: #eff6ff;
}

/* Settings Panel */
.cces-settings {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cces-settings-inner {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
    animation: cces-fade-in 0.25s ease-out;
}

@keyframes cces-fade-in {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

.cces-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.cces-settings-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
}

.cces-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}

.cces-close:hover {
    color: #4b5563;
}

.cces-settings-body {
    padding: 20px 28px;
}

.cces-settings-intro {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0 0 20px;
}

/* Category rows */
.cces-category {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
}

.cces-category-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #fafafa;
}

.cces-category-info {
    flex: 1;
}

.cces-category-info strong {
    font-size: 14px;
    color: #1a1a2e;
}

.cces-badge {
    display: inline-block;
    margin-left: 8px;
    background: #dbeafe;
    color: #1e40af;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.cces-expand {
    background: none;
    border: none;
    font-size: 22px;
    color: #9ca3af;
    cursor: pointer;
    padding: 0 6px;
    transition: transform 0.2s;
}

.cces-expand.cces-expanded {
    transform: rotate(90deg);
}

.cces-category-detail {
    padding: 12px 16px 16px;
    border-top: 1px solid #e5e7eb;
}

.cces-category-detail p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #6b7280;
}

/* Toggle switch */
.cces-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

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

.cces-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #d1d5db;
    border-radius: 24px;
    transition: background 0.3s;
}

.cces-toggle-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
}

.cces-toggle input:checked + .cces-toggle-slider {
    background: #2563eb;
}

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

.cces-toggle-locked {
    background: #93c5fd !important;
    cursor: not-allowed;
}

.cces-toggle input:checked + .cces-toggle-locked::before {
    transform: translateX(20px);
}

/* Settings footer */
.cces-settings-footer {
    display: flex;
    gap: 10px;
    padding: 16px 28px 24px;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
}

/* Reopen button */
.cces-reopen {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 99999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
}

.cces-reopen:hover {
    background: #1d4ed8;
    transform: scale(1.08);
}

/* Mobile responsive */
@media (max-width: 600px) {
    .cces-banner-inner {
        padding: 22px 18px 18px;
    }

    .cces-text h3 {
        font-size: 17px;
    }

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

    .cces-actions {
        flex-direction: column;
    }

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

    .cces-settings-inner {
        max-height: 90vh;
        border-radius: 12px;
    }

    .cces-settings-header,
    .cces-settings-body,
    .cces-settings-footer {
        padding-left: 18px;
        padding-right: 18px;
    }

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

    .cces-settings-footer .cces-btn {
        width: 100%;
        text-align: center;
    }
}
