/* Store marketing popups — shared across themes */

body.store-popup-open {
    overflow: hidden;
}

.store-popups-root {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 4vw, 32px);
}

.store-popups-root[hidden] {
    display: none;
}

.store-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 8, 7, 0.55);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.store-popup__panel {
    position: relative;
    z-index: 1;
    width: min(100%, 760px);
    max-height: min(88vh, 720px);
    overflow: auto;
    border-radius: 16px;
    border: 1px solid rgba(26, 15, 10, 0.08);
    box-shadow: 0 24px 60px rgba(10, 10, 10, 0.18);
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.4s ease,
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.store-popups-root.is-visible .store-popup__backdrop {
    opacity: 1;
}

.store-popups-root.is-visible .store-popup__panel {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.04s;
}

.store-popups-root.is-closing .store-popup__backdrop {
    opacity: 0;
    transition-duration: 0.28s;
}

.store-popups-root.is-closing .store-popup__panel {
    opacity: 0;
    transform: translateY(20px);
    transition-duration: 0.28s;
    transition-delay: 0s;
}

.store-popup__panel--split {
    width: min(100%, 860px);
    overflow: hidden;
    padding: 0;
}

.store-popup__split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 360px;
}

.store-popup__split-image {
    min-height: 100%;
    background: #ececec;
}

.store-popup__split-image img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
}

.store-popup__split-image-placeholder {
    width: 100%;
    min-height: 360px;
    background: linear-gradient(135deg, #ececec, #d8d8d8);
}

.store-popup__split-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: clamp(24px, 4vw, 32px);
    text-align: left;
}

.store-popup__subtitle {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.85;
    line-height: 1.4;
}

.store-popup__form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.store-popup__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.82rem;
}

.store-popup__field-label {
    font-weight: 600;
}

.store-popup__input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(26, 15, 10, 0.12);
    border-radius: 8px;
    font: inherit;
    color: inherit;
    background: rgba(255, 255, 255, 0.92);
}

.store-popup__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 8px;
}

.store-popup__claim-notice {
    margin: 12px 0 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #166534;
}

.store-popup__claim-notice--error {
    color: #b91c1c;
}

.store-popup__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: #1a0f0a;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.store-popup__close:hover,
.store-popup__close:focus-visible {
    background: #fff;
}

.store-popup__image {
    display: block;
    width: 100%;
    max-height: 220px;
    object-fit: cover;
}

.store-popup__body {
    padding: 28px 24px 24px;
    text-align: center;
}

.store-popup__heading {
    margin: 0;
    font-size: clamp(1.25rem, 2.4vw, 1.6rem);
    line-height: 1.2;
    font-weight: 600;
    text-align: left;
}

.store-popup__message {
    margin: 0;
    font-size: 1rem;
    line-height: 1.55;
    opacity: 0.9;
    text-align: left;
}

.store-popup__message--md p {
    margin: 0 0 0.75em;
}

.store-popup__message--md p:last-child {
    margin-bottom: 0;
}

.store-popup__message--md ul,
.store-popup__message--md ol {
    margin: 0 0 0.75em;
    padding-left: 1.25em;
}

.store-popup__message--md a {
    color: inherit;
    text-decoration: underline;
}

.store-popup__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 12px 22px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.store-popup__cta:hover {
    filter: brightness(1.05);
}

@media (max-width: 720px) {
    .store-popup__split {
        grid-template-columns: 1fr;
    }

    .store-popup__split-image img,
    .store-popup__split-image-placeholder {
        min-height: 180px;
    }

    .store-popup__body {
        padding: 24px 18px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .store-popup__backdrop,
    .store-popup__panel {
        transition: none !important;
        transform: none !important;
    }

    .store-popups-root.is-visible .store-popup__backdrop,
    .store-popups-root.is-visible .store-popup__panel {
        opacity: 1;
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
