:root {
    --pmf-consent-bg: #fffaf8;
    --pmf-consent-soft: #f9eaea;
    --pmf-consent-accent: #cf7d8e;
    --pmf-consent-accent-dark: #b65f73;
    --pmf-consent-text: #4d3d42;
    --pmf-consent-muted: #817177;
    --pmf-consent-line: rgba(77, 61, 66, 0.12);
}

.pmf-consent[hidden] {
    display: none !important;
}

.pmf-consent {
    position: fixed;
    inset: 0;
    z-index: 99990;
    pointer-events: none;
    font-family: "Montserrat", Arial, sans-serif;
}

.pmf-consent *,
.pmf-consent *::before,
.pmf-consent *::after {
    box-sizing: border-box;
}

.pmf-consent-entry {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.35s ease,
        visibility 0.35s ease;
}

.pmf-consent.is-banner-visible .pmf-consent-entry {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.pmf-consent-entry__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(44, 34, 38, 0.28);
    backdrop-filter: blur(6px);
}

.pmf-consent-banner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr) 240px;
    gap: 28px;
    align-items: center;
    width: min(1000px, 100%);
    border: 1px solid rgba(207, 125, 142, 0.16);
    border-radius: 30px;
    background: var(--pmf-consent-bg);
    padding: 30px 34px;
    box-shadow: 0 28px 80px rgba(55, 40, 45, 0.19);
    transform: translateY(22px) scale(0.985);
    transition: transform 0.5s cubic-bezier(0.2, 0.75, 0.2, 1);
}

.pmf-consent.is-banner-visible .pmf-consent-banner {
    transform: translateY(0) scale(1);
}

.pmf-consent-banner__cookie {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 130px;
    height: 130px;
}

.pmf-consent-banner__cookie img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pmf-consent-banner__copy {
    min-width: 0;
}

.pmf-consent-banner h2,
.pmf-consent-panel h2 {
    margin: 0;
    color: var(--pmf-consent-text);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 500;
    letter-spacing: -0.03em;
}

.pmf-consent-banner h2 {
    font-size: 2rem;
    line-height: 1;
}

.pmf-consent-banner h2 em,
.pmf-consent-panel h2 em {
    color: var(--pmf-consent-accent);
    font-family: "Caveat", "Cormorant Garamond", cursive;
    font-style: normal;
    font-weight: 500;
    letter-spacing: 0;
}

.pmf-consent-banner__copy p {
    max-width: 530px;
    margin: 13px 0 0;
    color: var(--pmf-consent-muted);
    font-size: 14px;
    line-height: 1.65;
}

.pmf-consent-banner__side {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.pmf-consent-banner__actions {
    display: grid;
    gap: 9px;
}

.pmf-consent-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border: 0;
    border-radius: 999px;
    padding: 0 20px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition:
        transform 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease;
}

.pmf-consent-btn:hover {
    transform: translateY(-2px);
}

.pmf-consent-btn--primary {
    background: var(--pmf-consent-accent);
    color: #fff;
}

.pmf-consent-btn--primary:hover {
    background: var(--pmf-consent-accent-dark);
}

.pmf-consent-btn--secondary {
    border: 1px solid rgba(77, 61, 66, 0.14);
    background: #fff;
    color: var(--pmf-consent-text);
}

.pmf-consent-btn--secondary:hover {
    border-color: rgba(207, 125, 142, 0.35);
    background: var(--pmf-consent-soft);
}

.pmf-consent-settings-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: max-content;
    margin: 12px auto 0;
    border: 0;
    background: transparent;
    padding: 5px 9px;
    color: var(--pmf-consent-muted);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.25s ease;
}

.pmf-consent-settings-link svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pmf-consent-settings-link:hover {
    color: var(--pmf-consent-accent-dark);
}

.pmf-consent-modal {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.35s ease,
        visibility 0.35s ease;
}

.pmf-consent.is-modal-visible .pmf-consent-modal {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.pmf-consent-modal__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(44, 34, 38, 0.38);
    backdrop-filter: blur(8px);
}

.pmf-consent-panel {
    position: relative;
    z-index: 2;
    width: min(720px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border: 1px solid rgba(207, 125, 142, 0.16);
    border-radius: 30px;
    background: var(--pmf-consent-bg);
    padding: 34px;
    box-shadow: 0 34px 100px rgba(52, 39, 44, 0.21);
    outline: none;
    transform: translateY(24px);
    opacity: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(207, 125, 142, 0.35) transparent;
    transition:
        transform 0.5s cubic-bezier(0.2, 0.75, 0.2, 1),
        opacity 0.35s ease;
}

.pmf-consent-panel::-webkit-scrollbar {
    width: 6px;
}

.pmf-consent-panel::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(207, 125, 142, 0.35);
}

.pmf-consent.is-modal-visible .pmf-consent-panel {
    transform: translateY(0);
    opacity: 1;
}

.pmf-consent-panel__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    margin-bottom: 23px;
}

.pmf-consent-panel__heading {
    max-width: 570px;
}

.pmf-consent-panel h2 {
    font-size: 2.15rem;
    line-height: 0.98;
}

.pmf-consent-panel__header p {
    max-width: 530px;
    margin: 12px 0 0;
    color: var(--pmf-consent-muted);
    font-size: 13px;
    line-height: 1.6;
}

.pmf-consent-panel__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(77, 61, 66, 0.13);
    border-radius: 50%;
    background: #fff;
    color: var(--pmf-consent-text);
    cursor: pointer;
    transition:
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease;
}

.pmf-consent-panel__close svg {
    display: block;
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.pmf-consent-panel__close:hover {
    border-color: rgba(207, 125, 142, 0.35);
    background: var(--pmf-consent-soft);
    color: var(--pmf-consent-accent-dark);
}

.pmf-consent-categories {
    display: grid;
    gap: 8px;
}

.pmf-consent-category {
    border: 1px solid var(--pmf-consent-line);
    border-radius: 18px;
    background: #fff;
    padding: 16px 17px;
}

.pmf-consent-category--required {
    background: var(--pmf-consent-soft);
}

.pmf-consent-category--inactive {
    background: rgba(255, 255, 255, 0.52);
}

.pmf-consent-category__top {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 13px;
    align-items: center;
}

.pmf-consent-category__icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--pmf-consent-soft);
    color: var(--pmf-consent-accent-dark);
}

.pmf-consent-category--required .pmf-consent-category__icon {
    background: #fff;
}

.pmf-consent-category--inactive .pmf-consent-category__icon {
    background: #f3eeee;
    color: #a8999e;
}

.pmf-consent-category__icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pmf-consent-category__heading {
    min-width: 0;
}

.pmf-consent-category__title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.pmf-consent-category h3 {
    margin: 0;
    color: var(--pmf-consent-text);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.22rem;
    font-weight: 600;
    line-height: 1.08;
}

.pmf-consent-category__title-row span {
    color: var(--pmf-consent-accent-dark);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pmf-consent-category__title-row .pmf-consent-category__inactive-label {
    color: #9d9094;
}

.pmf-consent-category p {
    margin: 5px 0 0;
    color: var(--pmf-consent-muted);
    font-size: 12px;
    line-height: 1.5;
}

.pmf-consent-category--inactive p {
    color: #9b8f93;
}

.pmf-consent-switch {
    position: relative;
    display: block;
    width: 44px;
    height: 26px;
    cursor: pointer;
}

.pmf-consent-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.pmf-consent-switch__track {
    position: absolute;
    inset: 0;
    display: block;
    border: 1px solid rgba(77, 61, 66, 0.13);
    border-radius: 999px;
    background: #e9e3e4;
    transition:
        background 0.3s ease,
        border-color 0.3s ease;
}

.pmf-consent-switch__thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(77, 61, 66, 0.14);
    transition: transform 0.3s cubic-bezier(0.2, 0.75, 0.2, 1);
}

.pmf-consent-switch input:checked + .pmf-consent-switch__track {
    border-color: var(--pmf-consent-accent);
    background: var(--pmf-consent-accent);
}

.pmf-consent-switch input:checked + .pmf-consent-switch__track .pmf-consent-switch__thumb {
    transform: translateX(18px);
}

.pmf-consent-switch--locked {
    cursor: default;
    opacity: 0.82;
}

.pmf-consent-switch--unavailable {
    cursor: default;
    opacity: 0.52;
}

.pmf-consent-switch--unavailable .pmf-consent-switch__track {
    background: #ebe7e8;
}

.pmf-consent-panel__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 20px;
}

.pmf-consent-panel__necessary {
    border: 0;
    background: transparent;
    padding: 8px 0;
    color: var(--pmf-consent-muted);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.pmf-consent-panel__necessary:hover {
    color: var(--pmf-consent-accent-dark);
}

.pmf-consent-panel__footer-actions {
    display: flex;
    gap: 8px;
}

body.pmf-consent-lock {
    overflow: hidden;
}

@media (max-width: 820px) {
    .pmf-consent-entry {
        padding: 18px;
    }

    .pmf-consent-banner {
        grid-template-columns: 95px minmax(0, 1fr);
        gap: 20px;
        width: min(610px, 100%);
        padding: 27px 28px;
    }

    .pmf-consent-banner__cookie {
        width: 95px;
        height: 95px;
    }

    .pmf-consent-banner__side {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 12px;
        align-items: center;
    }

    .pmf-consent-banner__actions {
        grid-template-columns: 1fr 1fr;
    }

    .pmf-consent-settings-link {
        margin: 0;
    }
}

@media (max-width: 560px) {
    .pmf-consent-entry {
        padding: 12px;
    }

    .pmf-consent-banner {
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 14px;
        width: min(410px, 100%);
        border-radius: 24px;
        padding: 20px 18px 18px;
    }

    .pmf-consent-banner__cookie {
        width: 72px;
        height: 72px;
        align-self: start;
    }

    .pmf-consent-banner h2 {
        font-size: 1.55rem;
        line-height: 1.02;
    }

    .pmf-consent-banner__copy p {
        margin-top: 8px;
        font-size: 12.5px;
        line-height: 1.5;
    }

    .pmf-consent-banner__side {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-top: 3px;
    }

    .pmf-consent-banner__actions {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .pmf-consent-btn {
        width: 100%;
        min-height: 44px;
        padding: 0 16px;
        font-size: 13.5px;
    }

    .pmf-consent-settings-link {
        margin: 3px auto 0;
        font-size: 12.5px;
    }

    .pmf-consent-modal {
        align-items: flex-end;
        padding: 8px;
    }

    .pmf-consent-panel {
        width: 100%;
        max-height: calc(100vh - 16px);
        border-radius: 25px;
        padding: 22px 15px 18px;
    }

    .pmf-consent-panel__header {
        gap: 10px;
        margin-bottom: 18px;
    }

    .pmf-consent-panel h2 {
        font-size: 1.7rem;
    }

    .pmf-consent-panel__header p {
        margin-top: 9px;
        font-size: 12px;
    }

    .pmf-consent-panel__close {
        width: 36px;
        height: 36px;
    }

    .pmf-consent-category {
        padding: 13px 12px;
        border-radius: 15px;
    }

    .pmf-consent-category__top {
        grid-template-columns: 32px minmax(0, 1fr) 42px;
        gap: 9px;
        align-items: start;
    }

    .pmf-consent-category__icon {
        width: 32px;
        height: 32px;
    }

    .pmf-consent-category__icon svg {
        width: 15px;
        height: 15px;
    }

    .pmf-consent-category h3 {
        font-size: 1.05rem;
    }

    .pmf-consent-category p {
        font-size: 11px;
        line-height: 1.45;
    }

    .pmf-consent-category__title-row span {
        font-size: 9px;
    }

    .pmf-consent-switch {
        width: 42px;
        height: 25px;
        margin-top: 2px;
    }

    .pmf-consent-switch__thumb {
        width: 17px;
        height: 17px;
    }

    .pmf-consent-switch input:checked + .pmf-consent-switch__track .pmf-consent-switch__thumb {
        transform: translateX(17px);
    }

    .pmf-consent-panel__footer {
        display: grid;
        gap: 8px;
        margin-top: 16px;
    }

    .pmf-consent-panel__footer-actions {
        display: grid;
        width: 100%;
    }

    .pmf-consent-panel__necessary {
        order: 2;
        justify-self: center;
        font-size: 12.5px;
    }
}

@media (max-width: 360px) {
    .pmf-consent-banner {
        grid-template-columns: 60px minmax(0, 1fr);
        gap: 11px;
        padding: 18px 15px 16px;
    }

    .pmf-consent-banner__cookie {
        width: 60px;
        height: 60px;
    }

    .pmf-consent-banner h2 {
        font-size: 1.4rem;
    }

    .pmf-consent-banner__copy p {
        font-size: 11.7px;
    }

    .pmf-consent-btn {
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pmf-consent-entry,
    .pmf-consent-banner,
    .pmf-consent-modal,
    .pmf-consent-panel,
    .pmf-consent-btn,
    .pmf-consent-switch__track,
    .pmf-consent-switch__thumb {
        transition: none;
    }
}
