/* ============================================
   CanhCam Cookie Consent - Frontend Styles
   Clean, minimal design matching reference
   ============================================ */

/* Banner Container */
.cccc-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
}

.cccc-banner--bottom {
    bottom: 0;
}

.cccc-banner--top {
    top: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Inner Container */
.cccc-banner__container {
    background: #fff;
    border-top: 3px solid #333;
}

.cccc-banner--top .cccc-banner__container {
    border-top: none;
    border-bottom: 3px solid #333;
}

/* Main Banner - horizontal layout */
.cccc-banner__main {
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
}

/* Content */
.cccc-banner__content {
    flex: 1;
    min-width: 0;
}

.cccc-banner__title {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}

.cccc-banner__text {
    margin: 0;
    color: #444;
    font-size: 13px;
    line-height: 1.5;
}

/* Buttons - aligned right */
.cccc-banner__actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    align-items: center;
}

.cccc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    line-height: 1.4;
}

/* Tùy chỉnh - outline */
.cccc-btn--settings {
    background: #fff;
    color: #333;
    border: 1px solid #999;
}

.cccc-btn--settings:hover {
    background: #f5f5f5;
    border-color: #666;
}

/* Từ chối tất cả - outline dark */
.cccc-btn--reject {
    background: #fff;
    color: #333;
    border: 1px solid #999;
}

.cccc-btn--reject:hover {
    background: #f5f5f5;
    border-color: #666;
}

/* Chấp nhận tất cả - filled */
.cccc-btn--accept {
    color: #fff;
    border: 1px solid transparent;
}

.cccc-btn--accept:hover {
    opacity: 0.9;
}

/* Save button */
.cccc-btn--save {
    color: #fff;
    border: 1px solid transparent;
}

.cccc-btn--save:hover {
    opacity: 0.9;
}

.cccc-btn--accept-all-settings {
    color: #fff;
    border: 1px solid transparent;
}

.cccc-btn--accept-all-settings:hover {
    opacity: 0.9;
}

/* Slide Animation */
.cccc-banner--bottom .cccc-banner__container {
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cccc-banner--top .cccc-banner__container {
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cccc-banner.cccc-visible .cccc-banner__container {
    transform: translateY(0);
}

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

.cccc-banner--top.cccc-closing .cccc-banner__container {
    transform: translateY(-100%);
}

/* ===========================
   Settings Panel (inline expand)
   =========================== */
.cccc-banner__settings {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
}

.cccc-settings__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e5e5;
}

.cccc-settings__header h3 {
    margin: 0;
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 700;
}

.cccc-settings__close {
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
}

.cccc-settings__close:hover {
    color: #333;
    border-color: #999;
    background: #f5f5f5;
}

/* Category Items */
.cccc-settings__categories {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.cccc-category {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #f8f8f8;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

.cccc-category__info {
    flex: 1;
}

.cccc-category__name {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 13px;
    margin-bottom: 2px;
}

.cccc-category__desc {
    color: #666;
    font-size: 12px;
    line-height: 1.4;
}

.cccc-category__badge {
    display: inline-block;
    font-size: 10px;
    padding: 1px 6px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 3px;
    margin-left: 6px;
    font-weight: 600;
}

/* Toggle Switch */
.cccc-toggle {
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
}

.cccc-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cccc-toggle__slider {
    display: block;
    width: 40px;
    height: 22px;
    background: #ccc;
    border-radius: 22px;
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
}

.cccc-toggle__slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.cccc-toggle input:checked + .cccc-toggle__slider {
    background: #4caf50;
}

.cccc-toggle input:checked + .cccc-toggle__slider::after {
    transform: translateX(18px);
}

.cccc-toggle input:disabled + .cccc-toggle__slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Settings Footer */
.cccc-settings__footer {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding-top: 10px;
    border-top: 1px solid #e5e5e5;
}

/* ===========================
   Responsive
   =========================== */
@media screen and (max-width: 768px) {
    .cccc-banner__main {
        flex-direction: column;
        align-items: stretch;
        padding: 14px 16px;
        gap: 12px;
    }

    .cccc-banner__actions {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }

    .cccc-btn {
        flex: 1;
        min-width: 0;
        padding: 8px 12px;
        font-size: 12px;
        text-align: center;
    }

    .cccc-banner__settings {
        padding: 0 16px 14px;
    }

    .cccc-settings__footer {
        flex-wrap: wrap;
    }

    .cccc-settings__footer .cccc-btn {
        flex: 1;
    }
}

@media screen and (max-width: 480px) {
    .cccc-banner__main {
        padding: 12px;
    }

    .cccc-banner__title {
        font-size: 14px;
    }

    .cccc-banner__text {
        font-size: 12px;
    }

    .cccc-btn {
        font-size: 11px;
        padding: 7px 10px;
    }
}
