/* ============================================
   Cookie Consent Module — Standalone CSS
   All classes prefixed .cc- to avoid conflicts.
   Copy this folder to any project for reuse.
   ============================================ */

/* --- Overlay (blocks interaction until consent) --- */
.cc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 99998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.cc-overlay.cc-visible {
    opacity: 1;
    pointer-events: auto;
}

/* --- Banner wrapper --- */
.cc-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    font-family: inherit;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.cc-wrapper.cc-visible {
    transform: translateY(0);
}

/* --- Banner bar --- */
.cc-banner {
    background: #1a1a2e;
    color: #e0e0e0;
    padding: 22px 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}
.cc-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.cc-banner-text {
    flex: 1;
    min-width: 280px;
}
.cc-banner-text h4 {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 6px;
    line-height: 1.4;
}
.cc-banner-text p {
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    color: #b0b0c0;
}
.cc-banner-text a {
    color: #64b5f6;
    text-decoration: underline;
}
.cc-banner-text a:hover {
    color: #90caf9;
}
.cc-banner-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* --- Buttons --- */
.cc-btn {
    display: inline-block;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    line-height: 1.5;
    white-space: nowrap;
}
.cc-btn-accept {
    background: #39b54a;
    color: #fff;
}
.cc-btn-accept:hover {
    background: #2ea03e;
}
.cc-btn-customize {
    background: transparent;
    color: #e0e0e0;
    border: 1.5px solid #555;
}
.cc-btn-customize:hover {
    border-color: #888;
    color: #fff;
}
.cc-btn-reject {
    background: transparent;
    color: #999;
    border: none;
    padding: 10px 16px;
    font-size: 13px;
    text-decoration: underline;
}
.cc-btn-reject:hover {
    color: #ccc;
}
.cc-btn-save {
    background: #0073e6;
    color: #fff;
}
.cc-btn-save:hover {
    background: #005bb5;
}

/* --- Preferences panel --- */
.cc-preferences {
    display: none;
    background: #ffffff;
    color: #333;
    max-width: 620px;
    margin: 0 auto;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.2);
    max-height: 80vh;
    overflow-y: auto;
}
.cc-preferences.cc-active {
    display: block;
}
.cc-preferences-header {
    padding: 24px 28px 16px;
    border-bottom: 1px solid #eee;
}
.cc-preferences-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 6px;
}
.cc-preferences-header p {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}
.cc-preferences-body {
    padding: 8px 28px 20px;
}
.cc-preferences-footer {
    padding: 16px 28px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* --- Category item --- */
.cc-category {
    padding: 18px 0;
    border-bottom: 1px solid #f0f0f0;
}
.cc-category:last-child {
    border-bottom: none;
}
.cc-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.cc-category-info {
    flex: 1;
}
.cc-category-info h5 {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 4px;
}
.cc-category-info p {
    font-size: 13px;
    color: #777;
    margin: 0;
    line-height: 1.5;
}
.cc-category-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
}
.cc-badge-required {
    background: #e8f5e9;
    color: #2e7d32;
}

/* --- Toggle switch --- */
.cc-toggle {
    position: relative;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}
.cc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.cc-toggle-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 26px;
    cursor: pointer;
    transition: background 0.25s ease;
}
.cc-toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.cc-toggle input:checked + .cc-toggle-slider {
    background: #39b54a;
}
.cc-toggle input:checked + .cc-toggle-slider::before {
    transform: translateX(20px);
}
.cc-toggle input:disabled + .cc-toggle-slider {
    background: #39b54a;
    opacity: 0.6;
    cursor: not-allowed;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .cc-banner-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    .cc-banner-actions {
        justify-content: center;
    }
    .cc-preferences {
        max-width: 100%;
        border-radius: 12px 12px 0 0;
    }
    .cc-preferences-header,
    .cc-preferences-body,
    .cc-preferences-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    .cc-preferences-footer {
        flex-direction: column;
    }
    .cc-preferences-footer .cc-btn {
        width: 100%;
        text-align: center;
    }
}
