/* ==========================================================================
   Delivery postcode checker modal
   Native replacement for the legacy WPCode #myModal injection.
   ========================================================================== */

.delivery-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.delivery-modal[hidden] {
    display: none;
}

.delivery-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 30, 24, 0.55);
    backdrop-filter: blur(2px);
}

.delivery-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: var(--cream, #fbf9f4);
    border: 1px solid var(--line-soft, #e7e1d6);
    border-radius: var(--radius, 12px);
    padding: 40px 34px 34px;
    box-shadow: 0 24px 60px rgba(20, 30, 24, 0.28);
}

.delivery-modal__close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: var(--muted, #6b6459);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
}

.delivery-modal__close:hover {
    color: var(--forest, #223829);
}

.delivery-modal__title {
    font-family: var(--display, serif);
    font-size: 1.6rem;
    color: var(--forest, #223829);
    margin: 0 0 10px;
}

.delivery-modal__lead {
    color: var(--muted, #6b6459);
    font-size: 0.95rem;
    margin: 0 0 20px;
}

.delivery-modal__label {
    display: block;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--forest, #223829);
    margin-bottom: 8px;
}

.delivery-modal__input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--line, #d9d2c6);
    border-radius: var(--radius, 12px);
    background: #fff;
    color: var(--forest, #223829);
    font-size: 0.95rem;
    margin-bottom: 18px;
}

.delivery-modal__input:focus {
    outline: none;
    border-color: var(--gold, #b78d4f);
    box-shadow: 0 0 0 3px rgba(183, 141, 79, 0.18);
}

.delivery-modal__submit {
    width: 100%;
}

.delivery-modal__message {
    margin: 18px 0 0;
    font-size: 0.92rem;
    min-height: 1.2em;
}

.delivery-modal__message.is-success {
    color: var(--forest, #223829);
}

.delivery-modal__message.is-error {
    color: #a33b2f;
}

.delivery-modal__call {
    width: 100%;
    margin-top: 14px;
}

.delivery-modal__call[hidden] {
    display: none;
}

@media (max-width: 480px) {
    .delivery-modal__dialog {
        padding: 34px 22px 26px;
    }
}

/* ==========================================================================
   Inline PDP postcode checker
   ========================================================================== */

.pdp-postcode {
    margin: 18px 0;
    padding: 18px;
    background: var(--cream-2, #f4f0e8);
    border: 1px solid var(--line-soft, #e7e1d6);
    border-radius: var(--radius, 12px);
}

.pdp-postcode__head {
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--forest, #223829);
    margin-bottom: 10px;
}

.pdp-postcode__form {
    display: flex;
    gap: 8px;
}

.pdp-postcode__input {
    flex: 1;
    min-width: 0;
    padding: 11px 13px;
    border: 1px solid var(--line, #d9d2c6);
    border-radius: var(--radius, 12px);
    background: #fff;
    color: var(--forest, #223829);
    font-size: 0.92rem;
}

.pdp-postcode__input:focus {
    outline: none;
    border-color: var(--gold, #b78d4f);
    box-shadow: 0 0 0 3px rgba(183, 141, 79, 0.18);
}

.pdp-postcode__btn {
    white-space: nowrap;
}

.pdp-postcode__btn[aria-busy="true"] {
    opacity: 0.6;
    cursor: progress;
}

.pdp-postcode__result {
    margin-top: 10px;
    font-size: 0.9rem;
    display: none;
}

.pdp-postcode__result.show {
    display: block;
}

.pc-ok {
    color: var(--forest, #223829);
}

.pc-error {
    color: #a33b2f;
}

@media (max-width: 480px) {
    .pdp-postcode__form {
        flex-wrap: wrap;
    }
    .pdp-postcode__input {
        flex: 1 1 100%;
    }
}
