/* ================================================================
   CoBa – Cookie Banner (Bottom Bar)
   Sandleiten project design system
   ================================================================ */

/* ── Banner ── */
.coba-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99998;
    background: #3B332D;
    color: #f4f1ec;
    font-family: "Manrope", sans-serif;
    box-shadow: 0 -4px 32px rgba(26, 17, 10, 0.25);
    max-height: 90vh;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.coba-banner::-webkit-scrollbar {
    display: none;
}

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

/* ── Inner layout ── */
.coba-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 28px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 767px) {
    .coba-banner-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 20px 20px;
    }
}

/* ── Text ── */
.coba-banner-text {
    flex: 1;
    min-width: 0;
}

.coba-banner-title {
    font-family: "the-seasons", serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.3;
    color: #fff;
    margin: 0 0 6px;
}

.coba-banner-desc {
    font-size: 13px;
    line-height: 1.55;
    color: rgba(244, 241, 236, 0.7);
    margin: 0;
}

/* ── Buttons ── */
.coba-banner-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .coba-banner-buttons {
        justify-content: stretch;
    }
    .coba-banner-buttons .coba-btn {
        flex: 1;
    }
}

.coba-btn {
    outline: none;
    appearance: none;
    border: none;
    padding: 11px 22px;
    border-radius: 6px;
    cursor: pointer;
    font-family: "Manrope", sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
    transition: background 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.coba-btn--primary {
    background: #C6A96B;
    color: #fff;
}

.coba-btn--primary:hover {
    background: #b8993d;
    box-shadow: 0 4px 16px rgba(198, 169, 107, 0.25);
}

.coba-btn--outline {
    background: transparent;
    color: rgba(244, 241, 236, 0.85);
    border: 1px solid rgba(244, 241, 236, 0.25);
}

.coba-btn--outline:hover {
    border-color: rgba(244, 241, 236, 0.5);
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.coba-btn:focus-visible {
    outline: 2px solid #C6A96B;
    outline-offset: 2px;
}

/* ── Settings panel (expandable) ── */
.coba-banner-settings {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 28px;
    max-width: 1200px;
    margin: 0 auto;
}

.coba-banner--expanded .coba-banner-settings {
    max-height: 600px;
    padding: 0 28px 24px;
}

@media (max-width: 767px) {
    .coba-banner-settings {
        padding: 0 20px;
    }
    .coba-banner--expanded .coba-banner-settings {
        padding: 0 20px 20px;
    }
}

/* Separator line */
.coba-banner--expanded .coba-banner-settings::before {
    content: "";
    display: block;
    height: 1px;
    background: rgba(244, 241, 236, 0.1);
    margin-bottom: 20px;
}

/* Save button inside settings */
.coba-btn--save {
    margin-top: 16px;
    width: 100%;
}

@media (min-width: 768px) {
    .coba-btn--save {
        width: auto;
    }
}

/* ── Cookie category tabs ── */
.coba-tab {
    position: relative;
    border: 1px solid rgba(244, 241, 236, 0.12);
    padding: 14px 16px;
    margin-bottom: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    transition: border-color 0.2s;
}

.coba-tab:hover {
    border-color: rgba(244, 241, 236, 0.2);
}

.coba-tab p {
    margin: 0;
color: rgba(237, 232, 224, 0.68);
}

.coba-tab .coba-tab-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.coba-tab .coba-tab-bar-title {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    color: #f4f1ec;
}

.coba-tab .coba-tab-bar-body {
    display: none;
    padding-top: 12px;
    font-size: 12px !important;
    line-height: 1.6;
    color: rgba(244, 241, 236, 0.6);
}

.coba-tab .coba-tab-bar-body p {
    font-size: 12px !important;
    line-height: 1.6;
}

.coba-tab .coba-tab-bar-body.show {
    display: block;
}

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

.coba-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.coba-switch .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: rgba(244, 241, 236, 0.15);
    transition: background-color 0.3s;
    border-radius: 24px;
}

.coba-switch .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: transform 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.coba-switch input:checked + .slider {
    background-color: #C6A96B;
}

.coba-switch input:focus-visible + .slider {
    box-shadow: 0 0 0 3px rgba(198, 169, 107, 0.35);
}

.coba-switch input:disabled + .slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.coba-switch input:disabled:checked + .slider {
    background-color: rgba(198, 169, 107, 0.55);
}

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

/* ── Arrow Indicator ── */
.coba-tab-arrow-down {
    width: 18px;
    height: 18px;
    position: relative;
    display: block;
    cursor: pointer;
    flex-shrink: 0;
}

.coba-tab-arrow-down span {
    width: 9px;
    height: 2px;
    background: #C6A96B;
    display: block;
    border-radius: 2px;
    transition: transform 0.3s;
}

.coba-tab-arrow-down span:first-of-type {
    position: absolute;
    top: 8px;
    left: 1px;
    transform: rotate(45deg);
}

.coba-tab-arrow-down span:last-of-type {
    position: absolute;
    top: 8px;
    right: 1px;
    transform: rotate(-45deg);
}

/* Rotate arrow when tab body is open */
.coba-tab:has(.coba-tab-bar-body.show) .coba-tab-arrow-down span:first-of-type {
    transform: rotate(-45deg);
}

.coba-tab:has(.coba-tab-bar-body.show) .coba-tab-arrow-down span:last-of-type {
    transform: rotate(45deg);
}
