.visitor-preferences {
    position: fixed;
    z-index: 20;
    inset: auto auto max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    width: min(394px, calc(100% - 32px));
    max-height: calc(100dvh - 30px);
    overflow: auto;
    padding: clamp(17px, 3vw, 23px);
    border: 1px solid #ded9ee;
    border-radius: 17px;
    color: var(--ink);
    background: linear-gradient(150deg, #fff 64%, #f6f3ff);
    box-shadow: 0 14px 42px #19103230, 0 2px 7px #19103214;
}

.visitor-preferences::before {
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, #492db9, #8065e4 56%, #57cfc6);
    content: '';
}

.visitor-preferences[hidden], .visitor-preferences [hidden] { display: none; }

.visitor-preferences-header { display: flex; align-items: center; gap: 11px; }
.visitor-preferences-header h2 { margin: 0; font-size: 1.12rem; line-height: 1.25; }
.visitor-preferences-icon {
    display: grid;
    flex: none;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 10px;
    color: #afeee9;
    background: #262048;
}
.visitor-preferences-icon .ui-icon { width: 18px; height: 18px; }
.visitor-preferences p { margin: 10px 0 4px; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.visitor-preferences-policy {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    color: var(--accent-strong);
    font-size: .82rem;
    font-weight: 620;
    text-underline-offset: 3px;
}
.visitor-preferences-policy .ui-icon { width: 13px; height: 13px; }
.visitor-preferences-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 44px;
    margin: 12px 0 8px;
    padding: 11px 12px;
    border: 1px solid #ded9ee;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}
.visitor-preferences-option input {
    flex: none;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--accent-strong);
}
.visitor-preferences-option span { min-width: 0; }
.visitor-preferences-option strong { display: block; font-size: .88rem; line-height: 1.35; }
.visitor-preferences-option small { display: block; margin-top: 4px; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.visitor-preferences-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 13px; }
.visitor-preferences-actions button {
    min-width: 104px;
    min-height: 44px;
    padding: 7px 14px;
    border: 1px solid #262048;
    border-radius: 9px;
    color: #fff;
    background: #262048;
    font: inherit;
    font-size: .82rem;
    font-weight: 660;
    line-height: 1.25;
    cursor: pointer;
}
.visitor-preferences-actions button:disabled { cursor: wait; opacity: .63; }
.visitor-preferences-actions button:not(:disabled):hover { background: #382f66; border-color: #382f66; }
.visitor-preferences-actions .visitor-preferences-secondary {
    border-color: #ddd4ef;
    background: #fff;
    color: var(--accent-strong);
}
.visitor-preferences-actions .visitor-preferences-secondary:not(:disabled):hover { border-color: #cbbbec; background: #f4effd; }
.visitor-preferences :is(a, button, input):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.visitor-preferences .visitor-preferences-status { color: #85323a; }
