/* ─── Cookie Consent Banner ──────────────────────────────────────────────── */
:root {
    --cc-bg: rgba(255, 255, 255, 0.97);
    --cc-text: #1f2937;
    --cc-muted: #4b5563;
    --cc-border: rgba(15, 81, 50, 0.18);
    --cc-button: #0f5132;
    --cc-button-hover: #0c3e27;
    --cc-link: #0f5132;
    --cc-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

/* ── Banner ── */
.uh-cookie-consent {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    width: min(960px, calc(100% - 24px));
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px 20px;
    border-radius: 14px;
    background: var(--cc-bg);
    color: var(--cc-text);
    border: 1px solid var(--cc-border);
    box-shadow: var(--cc-shadow);
    z-index: 1100;
    font-family: 'Prompt', sans-serif;
    animation: uhCcSlideIn 280ms ease-out both;
}

.uh-cookie-consent__icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #fff4e5;
    color: #fb923c;
    flex: 0 0 auto;
    font-size: 1.1rem;
    line-height: 1;
    margin-top: 2px;
}

.uh-cookie-consent__content {
    min-width: 0;
    flex: 1;
}

.uh-cookie-consent__title {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 600;
}

.uh-cookie-consent__text {
    margin: 0;
    font-size: 0.88rem;
    color: var(--cc-muted);
    line-height: 1.6;
}

.uh-cookie-consent__link {
    color: var(--cc-link);
    text-decoration: underline;
    font-weight: 500;
}

.uh-cookie-consent__link:hover {
    color: var(--cc-button-hover);
}

.uh-cookie-consent__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.uh-cookie-consent__settings,
.uh-cookie-consent__accept {
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 180ms ease;
    padding: 8px 18px;
    line-height: 1.4;
}

.uh-cookie-consent__settings {
    border: 1.5px solid #d1d5db;
    background: transparent;
    color: #374151;
}

.uh-cookie-consent__settings:hover {
    border-color: var(--cc-button);
    color: var(--cc-button);
    background: rgba(15, 81, 50, 0.04);
}

.uh-cookie-consent__accept {
    border: 1px solid transparent;
    background: var(--cc-button);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 81, 50, 0.28);
}

.uh-cookie-consent__accept:hover {
    background: var(--cc-button-hover);
}

.uh-cookie-consent__close {
    margin-left: auto;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
    padding: 2px 4px;
    flex: 0 0 auto;
    align-self: flex-start;
}

.uh-cookie-consent__close:hover {
    color: #374151;
}

@keyframes uhCcSlideIn {
    from { opacity: 0; transform: translate(-50%, 14px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ─── Cookie Settings Modal ─────────────────────────────────────────────── */
.uh-cc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: uhCcFadeIn 200ms ease both;
}

.uh-cc-overlay.is-hidden {
    display: none;
}

@keyframes uhCcFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.uh-cc-modal {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
    width: min(560px, 100%);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    font-family: 'Prompt', sans-serif;
    color: var(--cc-text);
    animation: uhCcModalIn 220ms ease both;
    position: relative;
}

@keyframes uhCcModalIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.uh-cc-modal__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
    border-radius: 16px 16px 0 0;
}

.uh-cc-modal__title {
    flex: 1;
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
}

.uh-cc-modal__accept-all {
    border: none;
    background: var(--cc-button);
    color: #fff;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 160ms ease;
    white-space: nowrap;
}

.uh-cc-modal__accept-all:hover {
    background: var(--cc-button-hover);
}

.uh-cc-modal__close {
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    padding: 2px 4px;
    margin-left: 4px;
    border-radius: 6px;
    transition: color 160ms;
}

.uh-cc-modal__close:hover {
    color: #374151;
}

.uh-cc-modal__body {
    padding: 0 20px;
}

/* Cookie Group Row */
.uh-cc-group {
    padding: 18px 0;
    border-bottom: 1px solid #f3f4f6;
}

.uh-cc-group:last-of-type {
    border-bottom: none;
}

.uh-cc-group__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.uh-cc-group__name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--cc-text);
    line-height: 1.4;
}

.uh-cc-group__always-on {
    font-size: 0.8rem;
    color: var(--cc-link);
    font-weight: 500;
    white-space: nowrap;
    padding-top: 2px;
    flex-shrink: 0;
    text-decoration: none;
}

.uh-cc-group__desc {
    font-size: 0.83rem;
    color: var(--cc-muted);
    line-height: 1.65;
    margin: 0;
}

.uh-cc-group__desc a {
    color: var(--cc-link);
    text-decoration: underline;
}

/* Toggle Switch */
.uh-cc-toggle {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.uh-cc-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.uh-cc-toggle__track {
    display: block;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: #d1d5db;
    position: relative;
    cursor: pointer;
    transition: background 200ms ease;
    flex-shrink: 0;
}

.uh-cc-toggle__track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.22);
    transition: transform 200ms ease;
}

.uh-cc-toggle input:checked + .uh-cc-toggle__track {
    background: var(--cc-button);
}

.uh-cc-toggle input:checked + .uh-cc-toggle__track::after {
    transform: translateX(20px);
}

.uh-cc-toggle input:focus-visible + .uh-cc-toggle__track {
    outline: 2px solid var(--cc-button);
    outline-offset: 2px;
}

/* Modal Footer */
.uh-cc-modal__footer {
    padding: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    border-top: 1px solid #e5e7eb;
}

.uh-cc-modal__confirm {
    width: 100%;
    border: none;
    background: var(--cc-button);
    color: #fff;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 160ms ease;
    box-shadow: 0 4px 14px rgba(15, 81, 50, 0.26);
}

.uh-cc-modal__confirm:hover {
    background: var(--cc-button-hover);
}

.uh-cc-modal__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.7;
}

.uh-cc-modal__brand img {
    height: 28px;
    width: auto;
}

.uh-cc-modal__brand span {
    font-size: 0.72rem;
    color: #6b7280;
    line-height: 1.3;
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 700px) {
    .uh-cookie-consent {
        left: 10px;
        right: 10px;
        bottom: 10px;
        width: auto;
        transform: none;
        flex-direction: column;
        gap: 10px;
        padding: 14px 16px;
    }

    .uh-cookie-consent__actions {
        justify-content: flex-end;
        width: 100%;
    }

    .uh-cookie-consent__close {
        position: absolute;
        top: 10px;
        right: 12px;
        margin-left: 0;
    }

    @keyframes uhCcSlideIn {
        from { opacity: 0; transform: translateY(14px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    .uh-cc-modal {
        max-height: calc(100dvh - 20px);
    }
}
