@font-face {
    font-family: "HDF Perpetua";
    src: url("../fonts/Perpetua.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

.hdf-pp-modal[hidden],
.hdf-pp-launch[hidden],
.hdf-pp-launch__value[hidden],
.hdf-pp-launch__separator[hidden],
.hdf-pp-preview__image[hidden],
.hdf-pp-engraving[hidden],
.hdf-pp-calibration-guides[hidden] {
    display: none !important;
}

.hdf-pp-private-preview .hob-hunting-initials {
    display: none !important;
}

.hdf-pp-private-note {
    margin: 7px 0 0 !important;
    color: rgba(12, 32, 48, 0.62);
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hdf-pp-preview-cart-locked .single_add_to_cart_button {
    pointer-events: none !important;
    opacity: 0.42 !important;
}

.hdf-pp-launch-wrap {
    grid-column: 1 / -1;
    width: 100%;
}

.woocommerce div.product .hob-product__cart form.cart .hdf-pp-launch,
.hdf-pp-launch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 52px;
    padding: 13px 18px;
    border: 1px solid var(--hob-primary-color, #0c2030);
    border-radius: var(--hob-radius-button, 0);
    background: transparent;
    color: var(--hob-primary-color, #0c2030);
    font-family: var(--hob-heading-font, Georgia, serif);
    font-weight: 600;
    text-align: left;
    transition:
        background-color var(--hob-transition-base, 260ms ease),
        color var(--hob-transition-base, 260ms ease),
        transform var(--hob-transition-base, 260ms ease);
}

.woocommerce div.product .hob-product__cart form.cart .hdf-pp-launch:hover,
.woocommerce div.product .hob-product__cart form.cart .hdf-pp-launch:focus-visible,
.hdf-pp-launch:hover,
.hdf-pp-launch:focus-visible {
    border-color: var(--hob-primary-color, #0c2030);
    background: var(--hob-primary-color, #0c2030);
    color: var(--hob-background-color, #fff);
    outline: 0;
    transform: none;
}

.hdf-pp-launch:focus-visible {
    box-shadow: 0 0 0 3px rgba(12, 32, 48, 0.16);
}

.hdf-pp-launch__summary {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    margin-left: 16px;
    white-space: nowrap;
}

.hdf-pp-launch__value {
    font-family: "HDF Perpetua", var(--hob-serif-font, Georgia, serif);
    font-synthesis: none;
    font-size: 1.15em;
    letter-spacing: 0.08em;
}

.hdf-pp-launch__separator {
    font-size: 0.48em;
    line-height: 1;
    opacity: 0.65;
}

.hdf-pp-launch__price {
    font-family: var(--hob-heading-font, Georgia, serif);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}

body.hdf-pp-modal-open {
    overflow: hidden;
}

.hdf-pp-modal {
    position: fixed;
    z-index: calc(var(--hob-z-popup, 300) + 20);
    inset: 0;
    display: grid;
    place-items: center;
    padding: clamp(12px, 2vw, 24px);
    visibility: hidden;
    opacity: 0;
    transition:
        opacity var(--hob-transition-base, 260ms ease),
        visibility 0s linear 260ms;
}

.hdf-pp-modal.is-open {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

.hdf-pp-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 15, 23, 0.72);
    backdrop-filter: blur(4px);
}

.hdf-pp-dialog {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
    width: min(100%, 1120px);
    height: min(78dvh, 700px);
    max-height: calc(100dvh - 24px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--hob-radius-box, 0);
    background: var(--hob-background-color, #fff);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.34);
    color: var(--hob-body-color, #0c2030);
    transform: translateY(14px) scale(0.99);
    transition: transform var(--hob-transition-base, 260ms ease);
}

.hdf-pp-modal.is-open .hdf-pp-dialog {
    transform: translateY(0) scale(1);
}

.hdf-pp-dialog:focus {
    outline: none;
}

.hdf-pp-dialog__close {
    position: absolute;
    z-index: 3;
    top: 14px;
    right: 14px;
    display: inline-grid;
    place-items: center;
    width: 50px;
    height: 50px;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--hob-primary-color, #0c2030) 30%, transparent);
    border-radius: 50%;
    background: transparent;
    box-shadow:
        inset 0 0 0 2px var(--hob-background-color, #fff),
        inset 0 0 0 4px color-mix(in srgb, var(--hob-primary-color, #0c2030) 60%, transparent);
    color: var(--hob-primary-color, #0c2030);
    transition:
        color var(--hob-transition-fast, 180ms ease),
        transform var(--hob-transition-fast, 180ms ease);
}

.hdf-pp-dialog__close span[aria-hidden="true"] {
    display: none;
}

.hdf-pp-dialog__close::before,
.hdf-pp-dialog__close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 1px;
    border-radius: 2px;
    background: currentColor;
    transform-origin: center;
}

.hdf-pp-dialog__close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.hdf-pp-dialog__close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.hdf-pp-dialog__close:hover,
.hdf-pp-dialog__close:focus-visible {
    background: transparent;
    color: var(--hob-primary-color, #0c2030);
    outline: none;
    transform: scale(1.04);
}

.hdf-pp-dialog__close:focus-visible,
.hdf-pp-color:focus-visible,
.hdf-pp-confirm:focus-visible,
.hdf-pp-field__input:focus-visible {
    box-shadow: 0 0 0 3px rgba(12, 32, 48, 0.16);
}

.hdf-pp-dialog__preview {
    display: grid;
    min-width: 0;
    min-height: 0;
    height: 100%;
    padding: 0;
    overflow: hidden;
    background: #f2eef0;
}

.hdf-pp-preview {
    position: relative;
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hdf-pp-preview__stage {
    position: relative;
    display: grid;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
}

.hdf-pp-preview__image,
.hdf-pp-engraving {
    grid-area: 1 / 1;
}

.hdf-pp-preview__image {
    position: relative;
    z-index: 1;
    display: block;
    width: auto;
    min-width: 100%;
    max-width: 100%;
    height: 100% !important;
    max-height: 100%;
    object-fit: cover;
    object-position: center;
}

.hdf-pp-engraving {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.hdf-pp-engraving[data-hdf-pp-renderer-visible="true"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.hdf-pp-engraving text {
    display: inline;
    visibility: visible;
    font-family: "HDF Perpetua", Perpetua, var(--hob-serif-font, Georgia, serif);
    font-weight: 400;
    font-style: normal;
    font-synthesis: none;
    paint-order: stroke fill;
    text-rendering: geometricPrecision;
}

.hdf-pp-engraving__mode[hidden],
.hdf-pp-engraving__diagnostic[hidden],
.hdf-pp-engraving__invalid-outline[hidden] {
    display: none !important;
}

.hdf-pp-engraving__invalid-outline {
    fill: rgba(178, 39, 52, 0.09);
    stroke: rgba(178, 39, 52, 0.72);
    stroke-width: 1.5px;
    stroke-dasharray: 6 5;
    vector-effect: non-scaling-stroke;
}

.hdf-pp-engraving__highlight {
    fill: none;
    stroke: #d4a477;
}

.hdf-pp-engraving__shadow {
    fill: #4d2917;
    stroke: #3b1f12;
    mix-blend-mode: multiply;
}

.hdf-pp-engraving__surface {
    mix-blend-mode: multiply;
}

.hdf-pp-engraving__advanced-surface {
    stroke: rgba(67, 36, 17, 0.2);
    stroke-width: 0.35px;
    mix-blend-mode: multiply;
}

.hdf-pp-engraving__advanced-inner-shadow,
.hdf-pp-engraving__advanced-bevel,
.hdf-pp-engraving__advanced-texture {
    fill: #fff;
    stroke: none;
}

.hdf-pp-engraving__advanced-inner-shadow {
    mix-blend-mode: multiply;
}

.hdf-pp-engraving__advanced-bevel {
    mix-blend-mode: normal;
}

.hdf-pp-engraving__advanced-texture {
    mix-blend-mode: soft-light;
}

.hdf-pp-engraving__diagnostic {
    fill: #ff315f !important;
    stroke: #fff !important;
    stroke-width: 2px !important;
    opacity: 1 !important;
    filter: none !important;
    mix-blend-mode: normal !important;
}

.hdf-pp-calibration-guides {
    pointer-events: none;
}

.hdf-pp-calibration-guides rect {
    fill: rgba(255, 210, 64, 0.08);
    stroke: #ffd240;
    stroke-width: 2;
    stroke-dasharray: 12 8;
    vector-effect: non-scaling-stroke;
}

.hdf-pp-calibration-guides line {
    stroke: #54d6ff;
    stroke-width: 1.5;
    stroke-dasharray: 7 7;
    vector-effect: non-scaling-stroke;
}

.hdf-pp-calibration-guides circle {
    fill: #ff4d76;
    stroke: #fff;
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
}

.hdf-pp-dialog__controls {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    padding: 70px 30px 24px;
    scrollbar-width: thin;
}

.hdf-pp-dialog__eyebrow {
    margin: 8px 58px 7px 0;
    color: var(--hob-accent-color, #6f6a5f);
    font-family: var(--hob-body-font, sans-serif);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hdf-pp-dialog__title {
    width: max-content;
    max-width: none !important;
    margin: 0 0 9px;
    padding-right: 0;
    color: var(--hob-primary-color, #0c2030);
    font-family: var(--hob-heading-font, Georgia, serif);
    font-size: 19px;
    font-weight: 400;
    line-height: 1.15;
    white-space: nowrap;
}

.hdf-pp-dialog__description {
    max-width: 46ch;
    margin: 0 0 18px;
    color: rgba(12, 32, 48, 0.72);
    font-family: var(--hob-body-font, sans-serif);
    font-size: 13px;
    line-height: 1.5;
}

.hdf-pp-fieldset {
    min-width: 0;
    margin: 0 0 18px;
    padding: 0;
    border: 0;
}

.hdf-pp-fieldset legend,
.hdf-pp-field label {
    display: block;
    margin: 0 0 8px;
    color: var(--hob-primary-color, #0c2030);
    font-family: var(--hob-body-font, sans-serif);
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hdf-pp-colors {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    padding: 2px;
}

.hdf-pp-color {
    position: relative;
    display: inline-flex;
    flex: 0 0 26px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 26px;
    min-width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid rgba(12, 32, 48, 0.2);
    border-radius: 0;
    background-color: var(--hdf-pp-swatch);
    color: var(--hob-primary-color, #0c2030);
    cursor: pointer;
    transition:
        opacity 200ms ease,
        outline-color 200ms ease,
        transform 200ms ease;
}

.hdf-pp-color::after {
    content: attr(aria-label);
    position: absolute;
    z-index: 5;
    bottom: calc(100% + 9px);
    left: 50%;
    width: max-content;
    max-width: 180px;
    padding: 5px 7px;
    border: 1px solid rgba(12, 32, 48, 0.16);
    background: var(--hob-primary-color, #0c2030);
    color: var(--hob-background-color, #fff);
    font-family: var(--hob-body-font, sans-serif);
    font-size: 0.65rem;
    font-weight: 500;
    line-height: 1.2;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, 3px);
    transition:
        opacity 160ms ease,
        transform 160ms ease;
}

.hdf-pp-color:hover::after,
.hdf-pp-color:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
}

.hdf-pp-color.is-selected {
    outline: 1px solid var(--hob-primary-color, #0c2030);
    outline-offset: 2px;
}

.hdf-pp-color:focus-visible {
    outline: 2px solid var(--hob-primary-color, #0c2030);
    outline-offset: 4px;
}

.hdf-pp-color:disabled,
.hdf-pp-color.is-unavailable {
    opacity: 0.32;
    cursor: not-allowed;
    transform: none;
}

@media (hover: hover) and (pointer: fine) {
    .hdf-pp-color:not(:disabled):hover {
        transform: scale(1.04);
    }
}

.hdf-pp-field {
    margin-bottom: 16px;
}

.hdf-pp-field__input {
    width: 100%;
    height: 46px;
    padding: 4px 13px 0;
    border: 1px solid rgba(12, 32, 48, 0.3);
    border-radius: 0;
    background: #fff;
    color: var(--hob-primary-color, #0c2030);
    font-family: "HDF Perpetua", Perpetua, var(--hob-serif-font, Georgia, serif);
    font-synthesis: none;
    font-size: 1.35rem;
    letter-spacing: 0.12em;
    text-align: center;
    text-transform: uppercase;
}

.hdf-pp-field__input:focus {
    border-color: var(--hob-primary-color, #0c2030);
    outline: none;
}

.hdf-pp-field__input.is-invalid,
.hdf-pp-field__input.is-invalid:focus {
    border-color: rgba(178, 39, 52, 0.72);
    border-style: dashed;
    background: rgba(178, 39, 52, 0.07);
    box-shadow: 0 0 0 3px rgba(178, 39, 52, 0.08);
}

.hdf-pp-field__help {
    margin: 6px 0 0;
    color: rgba(12, 32, 48, 0.62);
    font-size: 0.68rem;
    line-height: 1.45;
}

.hdf-pp-fee {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 16px;
    padding: 11px 0;
    border-block: 1px solid rgba(12, 32, 48, 0.12);
    font-size: 0.75rem;
}

.hdf-pp-fee strong {
    color: var(--hob-primary-color, #0c2030);
    font-weight: 650;
    text-align: right;
}

.hdf-pp-status {
    min-height: 1.35em;
    margin: 0 0 10px;
    color: rgba(12, 32, 48, 0.72);
    font-size: 0.75rem;
    line-height: 1.45;
}

.hdf-pp-status.is-error {
    color: #8a2e2e;
}

.hdf-pp-calibration {
    margin: 0 0 16px;
    padding: 14px;
    border: 1px solid rgba(12, 32, 48, 0.2);
    background: #f6f6f4;
}

.hdf-pp-calibration__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.hdf-pp-calibration__eyebrow {
    margin: 0 0 3px;
    color: rgba(12, 32, 48, 0.62);
    font-size: 0.6rem;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hdf-pp-calibration h3 {
    margin: 0;
    color: var(--hob-primary-color, #0c2030);
    font-family: var(--hob-heading-font, Georgia, serif);
    font-size: 0.98rem;
    font-weight: 500;
}

.hdf-pp-calibration > p {
    margin: 0 0 10px;
    color: rgba(12, 32, 48, 0.67);
    font-size: 0.7rem;
    line-height: 1.5;
}

.hdf-pp-calibration__font {
    flex: 0 0 auto;
    color: rgba(12, 32, 48, 0.62);
    font-size: 0.62rem;
    font-weight: 700;
}

.hdf-pp-calibration__font.is-ready {
    color: #246b3d;
}

.hdf-pp-calibration__font.is-error {
    color: #8a2e2e;
}

.hdf-pp-calibration__render-mode {
    display: grid;
    gap: 5px;
    margin: 0 0 10px;
    color: var(--hob-primary-color, #0c2030);
    font-size: 0.68rem;
    font-weight: 650;
}

.hdf-pp-calibration__render-mode select {
    width: 100%;
    min-height: 34px;
    padding: 5px 8px;
    border: 1px solid rgba(12, 32, 48, 0.28);
    border-radius: 0;
    background: #fff;
    color: var(--hob-primary-color, #0c2030);
    font: inherit;
}

.hdf-pp-calibration__colour {
    display: grid;
    gap: 5px;
    margin: 0 0 10px;
    color: var(--hob-primary-color, #0c2030);
    font-size: 0.68rem;
    font-weight: 650;
}

.hdf-pp-calibration__colour > span {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.hdf-pp-calibration__colour output {
    font-variant-numeric: tabular-nums;
    font-weight: 750;
}

.hdf-pp-calibration__colour input[type="color"] {
    width: 100%;
    height: 34px;
    padding: 2px;
    border: 1px solid rgba(12, 32, 48, 0.28);
    border-radius: 0;
    background: #fff;
    cursor: pointer;
}

.hdf-pp-calibration__controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 14px;
}

.hdf-pp-calibration__group-title {
    grid-column: 1 / -1;
    margin: 4px 0 0;
    padding-top: 8px;
    border-top: 1px solid rgba(12, 32, 48, 0.12);
    color: rgba(12, 32, 48, 0.58);
    font-size: 0.58rem;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hdf-pp-calibration__group-title:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.hdf-pp-calibration__control {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.hdf-pp-calibration__control > span {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--hob-primary-color, #0c2030);
    font-size: 0.63rem;
    font-weight: 650;
}

.hdf-pp-calibration__control output {
    font-variant-numeric: tabular-nums;
    font-weight: 750;
}

.hdf-pp-calibration__control input[type="range"] {
    width: 100%;
    accent-color: var(--hob-primary-color, #0c2030);
}

.hdf-pp-calibration__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.hdf-pp-calibration__actions button {
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--hob-primary-color, #0c2030);
    background: transparent;
    color: var(--hob-primary-color, #0c2030);
    font-size: 0.65rem;
    font-weight: 700;
}

.hdf-pp-calibration__actions button:hover,
.hdf-pp-calibration__actions button:focus-visible {
    background: var(--hob-primary-color, #0c2030);
    color: #fff;
    outline: none;
}

.hdf-pp-calibration__json {
    width: 100%;
    margin-top: 8px;
    padding: 9px;
    border: 1px solid rgba(12, 32, 48, 0.18);
    background: #fff;
    color: var(--hob-primary-color, #0c2030);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.65rem;
    line-height: 1.4;
    resize: vertical;
}

.hdf-pp-calibration__diagnostic {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 10px;
    color: var(--hob-primary-color, #0c2030);
    font-size: 0.68rem;
    font-weight: 650;
}

.hdf-pp-calibration__diagnostic input {
    margin: 0;
    accent-color: var(--hob-primary-color, #0c2030);
}

.hdf-pp-confirm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid var(--hob-primary-color, #0c2030);
    border-radius: var(--hob-radius-button, 0);
    background: var(--hob-primary-color, #0c2030);
    color: var(--hob-background-color, #fff);
    font-family: var(--hob-heading-font, Georgia, serif);
    font-weight: 650;
    margin-top: auto;
    transition:
        background-color var(--hob-transition-base, 260ms ease),
        border-color var(--hob-transition-base, 260ms ease),
        color var(--hob-transition-base, 260ms ease);
}

.hdf-pp-confirm:hover,
.hdf-pp-confirm:focus-visible {
    border-color: var(--hob-accent-color, #6f6a5f);
    background: var(--hob-accent-color, #6f6a5f);
    outline: none;
}

.hdf-pp-is-submitting .single_add_to_cart_button {
    pointer-events: none;
}

@media (max-width: 900px) {
    .hdf-pp-dialog {
        grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    }

}

@media (max-width: 767px) {
    .hdf-pp-modal {
        place-items: end stretch;
        padding: 0;
    }

    .hdf-pp-dialog {
        display: block;
        width: 100%;
        height: auto;
        max-height: 100dvh;
        overflow-y: auto;
        border-inline: 0;
        border-bottom: 0;
        transform: translateY(22px);
        overscroll-behavior: contain;
    }

    .hdf-pp-dialog__close {
        position: fixed;
        top: max(12px, env(safe-area-inset-top));
        right: 12px;
    }

    .hdf-pp-dialog__close,
    .hdf-pp-dialog__close:hover,
    .hdf-pp-dialog__close:focus-visible {
        border-color: rgba(255, 255, 255, 0.96);
        background: rgba(12, 32, 48, 0.12);
        box-shadow:
            inset 0 0 0 2px rgba(12, 32, 48, 0.34),
            inset 0 0 0 4px #fff;
        color: #fff;
    }

    .hdf-pp-dialog__preview {
        width: 100%;
        height: min(44svh, 380px);
        min-height: 260px;
        padding: 0;
    }

    .hdf-pp-preview {
        min-height: 0;
    }

    .hdf-pp-preview__image {
        max-height: 100%;
    }

    .hdf-pp-dialog__controls {
        overflow: visible;
        padding: 24px 20px calc(22px + env(safe-area-inset-bottom));
    }

    .hdf-pp-dialog__title {
        width: max-content;
        max-width: none !important;
        font-size: clamp(16px, 5vw, 19px);
        white-space: nowrap;
    }

    .hdf-pp-dialog__description {
        margin-bottom: 16px;
    }

    .hdf-pp-colors {
        gap: 8px;
    }

    .hdf-pp-calibration__controls {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 390px) {
    .hdf-pp-fee {
        display: grid;
        gap: 4px;
    }

    .hdf-pp-fee strong {
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hdf-pp-modal,
    .hdf-pp-dialog,
    .hdf-pp-launch,
    .hdf-pp-color,
    .hdf-pp-confirm {
        scroll-behavior: auto;
        transition-duration: 0.01ms !important;
    }
}
