.app-confirm-open {
    overflow: hidden;
}

.app-confirm-overlay[hidden] {
    display: none !important;
}

.app-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 30000;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.app-confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(3px);
}

.app-confirm-dialog {
    position: relative;
    width: min(100%, 31rem);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.9rem 1rem;
    padding: clamp(1rem, 4vw, 1.5rem);
    border: 1px solid rgba(var(--theme-border-rgb, 199, 210, 223), 0.85);
    border-radius: var(--shop-radius, 14px);
    background: rgb(var(--theme-card-rgb, 255, 255, 255));
    color: var(--theme-safe-card-text, #172033);
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.45);
}

.app-confirm-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--shop-button-bg, #0f6cbd);
    color: var(--theme-safe-button-text, #ffffff);
    font-size: 1.2rem;
    font-weight: 900;
}

.app-confirm-copy {
    min-width: 0;
}

.app-confirm-copy h2 {
    margin: 0 0 0.45rem;
    color: var(--theme-safe-heading-text, var(--theme-safe-card-text, #172033));
    font-size: clamp(1.1rem, 4vw, 1.35rem);
}

.app-confirm-copy p {
    margin: 0;
    color: var(--theme-safe-muted-text, #526071);
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.app-confirm-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    margin-top: 0.35rem;
}

.app-confirm-actions .btn {
    min-width: 7.5rem;
    white-space: normal;
}

.app-confirm-accept.is-danger {
    border-color: #c94747 !important;
    background: #b73535 !important;
    color: #ffffff !important;
}

.photo-upload-file-error {
    display: block;
    margin-top: 0.35rem;
    color: var(--theme-safe-danger-text, #b42318);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.4;
}

.photo-upload-file-error[hidden] {
    display: none !important;
}

.image-skeleton-shell {
    position: relative;
    overflow: hidden;
    background: rgba(var(--theme-card-secondary-rgb, 243, 246, 250), 0.95);
}

.image-skeleton-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(
        100deg,
        transparent 20%,
        rgba(255, 255, 255, 0.58) 45%,
        transparent 70%);
    background-size: 220% 100%;
    animation: ecommerce-image-skeleton 1.15s linear infinite;
}

.image-skeleton-shell > img {
    position: relative;
    z-index: 1;
    opacity: 0;
    transition: opacity 180ms ease;
}

.image-skeleton-shell.is-image-loaded::before {
    display: none;
}

.image-skeleton-shell.is-image-loaded > img {
    opacity: 1;
}

@keyframes ecommerce-image-skeleton {
    to { background-position-x: -220%; }
}

.image-preview-gallery-thumbnails {
    position: absolute;
    left: 50%;
    bottom: 3.2rem;
    z-index: 3;
    max-width: calc(100% - 2rem);
    display: flex;
    gap: 0.4rem;
    padding: 0.4rem;
    overflow-x: auto;
    transform: translateX(-50%);
    border-radius: 0.65rem;
    background: rgba(0, 0, 0, 0.55);
}

.image-preview-gallery-thumbnails[hidden] {
    display: none !important;
}

.image-preview-gallery-thumb {
    flex: 0 0 auto;
    width: 3.2rem;
    height: 3.2rem;
    padding: 0.15rem;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 0.45rem;
    background: rgba(255, 255, 255, 0.94);
}

.image-preview-gallery-thumb.is-selected {
    border-color: var(--shop-button-bg, #0f6cbd);
}

.image-preview-gallery-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 0.28rem;
}

.image-preview-variant-picker {
    display: grid;
    gap: 0.35rem;
}

.image-preview-variant-picker[hidden] {
    display: none !important;
}

.image-preview-variant-picker > span {
    color: var(--theme-safe-muted-text, #526071);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

@media (prefers-reduced-motion: reduce) {
    .image-skeleton-shell::before { animation: none; }
}

@media (max-width: 30rem) {
    .app-confirm-dialog {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .app-confirm-icon {
        margin-inline: auto;
    }

    .app-confirm-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .app-confirm-actions .btn {
        width: 100%;
    }
}
