:root {
    --oe-cookie-primary: #046F5E;
    --oe-cookie-ink: #1f2937;
    --oe-cookie-muted: #4b5563;
    --oe-cookie-line: rgba(17, 24, 39, 0.14);
}

/* Banner */
.oe-cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1800;
    background: #fffdf7;
    border-top: 1px solid var(--oe-cookie-line);
    box-shadow: 0 -6px 28px rgba(15, 23, 42, 0.1);
    transform: translateY(110%);
    transition: transform 0.35s ease;
}

.oe-cookie-banner.is-visible {
    transform: translateY(0);
}

.oe-cookie-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    max-width: 1320px;
    margin: 0 auto;
    padding: 18px 24px;
}

.oe-cookie-copy {
    min-width: 0;
}

.oe-cookie-copy strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--oe-cookie-ink);
}

.oe-cookie-copy p {
    margin: 0;
    font-size: 0.83rem;
    line-height: 1.6;
    color: var(--oe-cookie-muted);
}

/* Inline links render as buttons so "Manage cookies" can open the dialog. */
.oe-cookie-link {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-weight: 700;
    color: var(--oe-cookie-ink);
    text-decoration: underline;
    cursor: pointer;
}

.oe-cookie-link:hover {
    color: var(--oe-cookie-primary);
}

.oe-cookie-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.oe-cookie-btn {
    padding: 9px 18px;
    border: 1px solid var(--oe-cookie-line);
    border-radius: 999px;
    background: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--oe-cookie-ink);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.oe-cookie-btn:hover {
    border-color: var(--oe-cookie-primary);
    color: var(--oe-cookie-primary);
}

.oe-cookie-btn-primary {
    border-color: var(--oe-cookie-primary);
    background: var(--oe-cookie-primary);
    color: #fff;
}

.oe-cookie-btn-primary:hover {
    background: #05573f;
    border-color: #05573f;
    color: #fff;
}

.oe-cookie-btn:focus-visible,
.oe-cookie-link:focus-visible {
    outline: 2px solid var(--oe-cookie-primary);
    outline-offset: 2px;
}

/* Preferences dialog */
.oe-cookie-dialog {
    position: fixed;
    inset: 0;
    margin: auto;
    box-sizing: border-box;
    width: min(520px, calc(100% - 32px));
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    padding: 0;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}

.oe-cookie-dialog::backdrop {
    background: rgba(15, 23, 42, 0.45);
}

.oe-cookie-dialog-form {
    margin: 0;
}

.oe-cookie-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--oe-cookie-line);
}

.oe-cookie-dialog-head h5 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--oe-cookie-ink);
}

.oe-cookie-dialog-close {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #f3f4f6;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--oe-cookie-muted);
    cursor: pointer;
}

.oe-cookie-dialog-close:hover {
    background: #e5e7eb;
}

.oe-cookie-dialog-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
}

.oe-cookie-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--oe-cookie-line);
    border-radius: 10px;
    cursor: pointer;
}

.oe-cookie-option:has(input:disabled) {
    background: #f9fafb;
    cursor: default;
}

.oe-cookie-option input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--oe-cookie-primary);
}

.oe-cookie-option span {
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--oe-cookie-muted);
}

.oe-cookie-option strong {
    display: block;
    margin-bottom: 2px;
    font-size: 0.9rem;
    color: var(--oe-cookie-ink);
}

.oe-cookie-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--oe-cookie-line);
    background: #fafafa;
    border-radius: 0 0 14px 14px;
}

/* Tablet */
@media (max-width: 991px) {
    .oe-cookie-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 16px 20px;
    }

    .oe-cookie-actions {
        width: 100%;
        flex-wrap: wrap;
    }
}

/* Mobile */
@media (max-width: 575px) {
    .oe-cookie-inner {
        padding: 14px 16px;
        gap: 14px;
    }

    .oe-cookie-copy p {
        font-size: 0.78rem;
    }

    .oe-cookie-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .oe-cookie-btn {
        width: 100%;
        padding: 11px 16px;
    }

    .oe-cookie-dialog-actions {
        flex-direction: column-reverse;
    }

    .oe-cookie-dialog-actions .oe-cookie-btn {
        width: 100%;
    }
}
