/* ============================================================
   cookie-consent.css — Site-wide cookie consent banner
   ============================================================ */

.adn-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: var(--color-primary, #1e3a2f);
    color: #fff;
    padding: 10px 0;
    box-shadow: 0 -4px 28px rgba(0, 0, 0, 0.22);
    transform: translateY(100%);
    transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.adn-cookie-banner.is-visible {
    transform: translateY(0);
}

/* ── Inner layout ─────────────────────────────────────── */
.acb-inner {
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

/* ── Text ─────────────────────────────────────────────── */
.acb-text {
    flex: 1;
    min-width: 240px;
}

.acb-msg {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.86);
}

.acb-link {
    color: var(--color-accent, #c9a84c);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.acb-link:hover {
    color: #e4cf82;
}

.acb-manage-link {
    display: inline;
    margin-left: 2px;
    padding: 0;
    background: none;
    border: none;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    transition: color 0.2s;
}

.acb-manage-link:hover {
    color: #fff;
}

/* ── Buttons ──────────────────────────────────────────── */
.acb-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.acb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 24px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    line-height: 1;
    transition: opacity 0.2s, background 0.2s;
    white-space: nowrap;
}

.acb-btn--accept {
    background: var(--color-accent, #c9a84c);
    color: #1e3a2f;
}

.acb-btn--accept:hover {
    background: #ddbf60;
}

/* Solid fill, same size/weight as .acb-btn--accept - UK ICO / EU regulator
   guidance treats a visually-dominant Accept next to a washed-out Reject as a
   non-compliant "nudge", so Reject must never look like the lesser option. */
.acb-btn--reject {
    background: #fff;
    color: var(--color-primary, #1e3a2f);
}

.acb-btn--reject:hover {
    background: rgba(255, 255, 255, 0.88);
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 600px) {
    .adn-cookie-banner { padding: 14px 0; }
    .acb-inner        { flex-direction: column; align-items: flex-start; gap: 10px; padding: 0 16px; }
    .acb-msg          { font-size: 0.8125rem; line-height: 1.45; }
    .acb-manage-link  { margin-left: 2px; font-size: 0.75rem; }
    .acb-actions      { width: 100%; gap: 8px; }
    .acb-btn          { flex: 1; padding: 8px 16px; }
}

/* ============================================================
   Manage Preferences - modal (banner link) + embedded panel
   (Cookie Policy page [adn_cookie_preferences] shortcode) share
   the same row/toggle/button styles below.
   ============================================================ */

.adn-cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.adn-cookie-modal.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.acm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.acm-wrap {
    position: relative;
    width: 100%;
    max-width: 520px;
}

.acm-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: var(--color-white, #fff);
    border-radius: var(--radius-lg, 16px);
    box-shadow: var(--shadow-xl, 0 16px 48px rgba(0, 0, 0, 0.14));
    padding: 28px 28px 24px;
    transform: translateY(12px) scale(0.98);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.adn-cookie-modal.is-visible .acm-dialog {
    transform: translateY(0) scale(1);
}

/* Floats outside the dialog card, on the dark backdrop - not inside .acm-dialog,
   which would clip it via that element's own overflow-y: auto. */
.acm-close {
    position: absolute;
    top: -14px;
    right: -14px;
    z-index: 2;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--color-white, #fff);
    color: var(--color-text, #2c3e50);
    border-radius: 50%;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: background 0.2s;
}

.acm-close:hover {
    background: var(--color-surface, #f3f4f6);
}

.acm-heading {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-heading, var(--color-text, #2c3e50));
}

.acm-intro {
    margin: 0 0 18px;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--color-text-muted, #6b7280);
}

.acm-intro a {
    color: var(--color-primary, #1e3a2f);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.acm-intro a:hover {
    color: var(--color-primary-light, #2d5a44);
}

/* ── Preference rows (shared: modal body + embed panel) ──── */

.adn-cookie-prefs-embed {
    background: var(--color-white, #fff);
    border: 1px solid var(--color-border, #e5e0d8);
    border-radius: var(--radius-md, 10px);
    padding: 24px;
    max-width: 640px;
}

.acp-row {
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border, #e5e0d8);
}

.acp-row:first-child {
    padding-top: 0;
}

.acp-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.acp-title {
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--color-heading, var(--color-text, #2c3e50));
}

.acp-always {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--color-primary, #1e3a2f);
    background: var(--color-tag-bg, #e8f0ec);
    padding: 3px 10px;
    border-radius: var(--radius-pill, 9999px);
}

.acp-desc {
    margin: 6px 0 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--color-text-muted, #6b7280);
}

/* ── Toggle switch ────────────────────────────────────── */

.acp-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}

.acp-switch .acp-toggle {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.acp-slider {
    position: absolute;
    inset: 0;
    background: var(--color-border-dark, #d1c9bc);
    border-radius: var(--radius-pill, 9999px);
    transition: background 0.2s;
}

.acp-slider::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.acp-toggle:checked + .acp-slider {
    background: var(--color-primary, #1e3a2f);
}

.acp-toggle:checked + .acp-slider::before {
    transform: translateX(18px);
}

.acp-toggle:focus-visible + .acp-slider {
    outline: 2px solid var(--color-accent, #c9a84c);
    outline-offset: 2px;
}

/* ── Preference actions ───────────────────────────────── */

.acp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.acp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 20px;
    border-radius: var(--radius-sm, 6px);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    line-height: 1;
    transition: opacity 0.2s, background 0.2s;
    white-space: nowrap;
}

.acp-btn--accept {
    background: var(--color-accent, #c9a84c);
    color: var(--color-primary, #1e3a2f);
}

.acp-btn--accept:hover {
    background: var(--color-accent-light, #e6c97a);
}

.acp-btn--save {
    background: var(--color-primary, #1e3a2f);
    color: #fff;
}

.acp-btn--save:hover {
    background: var(--color-primary-light, #2d5a44);
}

/* Solid fill, same visual weight as .acp-btn--accept/--save - see the note on
   .acb-btn--reject above; the same "equal prominence" rule applies here. */
.acp-btn--reject {
    background: var(--color-surface, #f3f4f6);
    color: var(--color-text, #2c3e50);
    border-color: var(--color-border-dark, #d1c9bc);
}

.acp-btn--reject:hover {
    background: var(--color-border, #e5e0d8);
}

.acp-saved-msg {
    margin: 12px 0 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-success, #22c55e);
}

@media (max-width: 480px) {
    .acp-actions { flex-direction: column; }
    .acp-btn     { width: 100%; }
}
