/* ResvBAR — cookie consent (floating bar, always on top) */

.rv-cc-root {
    font-family: 'Tajawal', system-ui, sans-serif;
    --rv-cc-z: 2147483000;
}

/* ── Floating bottom bar ── */
.rv-cc-bar {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: var(--rv-cc-z);
    padding: 0 12px calc(12px + env(safe-area-inset-bottom, 0px));
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(calc(100% + 16px));
    transition: opacity 0.32s ease, transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.32s;
}

.rv-cc-bar.is-visible {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.rv-cc-bar__surface {
    max-width: 920px;
    margin: 0 auto;
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(1, 48, 95, 0.12);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.8) inset,
        0 12px 40px rgba(1, 48, 95, 0.22),
        0 2px 8px rgba(1, 48, 95, 0.08);
    overflow: hidden;
}

.rv-cc-bar__surface::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, #01305f 0%, #0089bf 60%, #fea31a 100%);
}

.rv-cc-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.875rem 1rem;
}

.rv-cc-bar__copy {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.rv-cc-bar__icon {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #01305f 0%, #0089bf 100%);
    color: #fff;
    font-size: 1rem;
}

.rv-cc-bar__text {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #475569;
}

.rv-cc-bar__title {
    display: inline;
    font-weight: 800;
    color: #01305f;
}

.rv-cc-bar__text a,
.rv-cc-bar__more {
    color: #0089bf;
    font-weight: 700;
    text-decoration: none;
    margin-inline-start: 0.15rem;
}

.rv-cc-bar__text a:hover,
.rv-cc-bar__more:hover {
    text-decoration: underline;
}

.rv-cc-bar__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ── Buttons: see rv-floating-bar-buttons.css ── */

.rv-cc-btn:focus-visible,
.rv-cc-modal__close:focus-visible {
    outline: 2px solid #0089bf;
    outline-offset: 2px;
}

/* ── Backdrop + modal ── */
.rv-cc-backdrop {
    position: fixed;
    inset: 0;
    z-index: calc(var(--rv-cc-z) + 1);
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s;
    pointer-events: none;
}

.rv-cc-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.rv-cc-modal {
    position: fixed;
    inset: 0;
    z-index: calc(var(--rv-cc-z) + 2);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s;
}

.rv-cc-modal.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.rv-cc-modal__dialog {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 56px rgba(1, 48, 95, 0.24);
    overflow: hidden;
}

.rv-cc-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.rv-cc-modal__title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 800;
    color: #01305f;
}

.rv-cc-modal__close {
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 8px;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.rv-cc-modal__close:hover {
    background: #e2e8f0;
    color: #01305f;
}

.rv-cc-modal__list {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
}

.rv-cc-modal__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
}

.rv-cc-modal__row--locked {
    opacity: 0.72;
}

.rv-cc-modal__row-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.rv-cc-modal__row-text strong {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #1e293b;
}

.rv-cc-modal__row-text span {
    font-size: 0.75rem;
    color: #94a3b8;
}

.rv-cc-modal__always {
    font-size: 0.6875rem;
    font-weight: 700;
    color: #01305f;
    white-space: nowrap;
}

.rv-cc-modal__foot {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid #f1f5f9;
}

.rv-cc-modal__foot .rv-cc-btn {
    flex: 1;
}

/* ── Switch ── */
.rv-cc-switch {
    position: relative;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}

.rv-cc-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.rv-cc-switch__track {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.rv-cc-switch__track::after {
    content: '';
    position: absolute;
    top: 2px;
    inset-inline-start: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.rv-cc-switch input:checked + .rv-cc-switch__track {
    background: #0089bf;
}

.rv-cc-switch input:checked + .rv-cc-switch__track::after {
    transform: translateX(-18px);
}

[dir="ltr"] .rv-cc-switch input:checked + .rv-cc-switch__track::after {
    transform: translateX(18px);
}

body.rv-cc-modal-open {
    overflow: hidden;
}

body.rv-cc-bar-open {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

/* mobile: see rv-floating-bar-mobile.css */

@media (prefers-reduced-motion: reduce) {
    .rv-cc-bar,
    .rv-cc-backdrop,
    .rv-cc-modal,
    .rv-cc-switch__track,
    .rv-cc-switch__track::after {
        transition: none;
    }
}
