/*
 * Puzzle Sales frontend stylesheet.
 * All selectors are prefixed with the .pzl- namespace to avoid conflicts.
 */

.pzl-has-sale {
        position: relative;
}

.pzl-sale-ribbon {
        position: absolute;
        top: 12px;
        left: 0;
        display: inline-block;
        padding: 0.4rem 0.75rem;
        background: #d93644;
        color: #fff;
        font-size: 0.75rem;
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        border-radius: 0 4px 4px 0;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
        pointer-events: none;
        z-index: 2;
}

.pzl-sale-ribbon::after {
        content: '';
        position: absolute;
        top: 100%;
        left: 0;
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 4px 6px 0 0;
        border-color: #962430 transparent transparent transparent;
}

.pzl-price-old {
        color: #8a8a8a;
        text-decoration: line-through;
        margin-right: 0.75rem;
        display: inline-block;
        font-weight: 400;
}

.pzl-price-new {
        color: #d93644;
        font-weight: 700;
        display: inline-block;
        font-size: 1.35rem;
}

.pzl-price-row {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 0.35rem;
}

.pzl-countdown {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        flex: 1 1 auto;
        padding: 0.75rem 1.25rem;
        border-radius: 10px;
        background: rgba(217, 54, 68, 0.16);
        color: #b3242f;
        font-size: 1.25rem;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-align: center;
        line-height: 1.35;
        text-transform: uppercase;
        box-sizing: border-box;
}

.pzl-countdown-holder {
        display: flex;
        justify-content: center;
        align-items: stretch;
        width: 100%;
        margin-top: 0.75rem;
}

.pzl-countdown-active {
        animation: pzl-countdown-pulse 1.5s ease-in-out infinite;
}

.pzl-countdown-ended {
        background: transparent;
        color: #777;
        animation: none;
}

@keyframes pzl-countdown-pulse {
        0%,
        100% {
                box-shadow: 0 0 0 0 rgba(217, 54, 68, 0.35);
        }

        50% {
                box-shadow: 0 0 0 0.4rem rgba(217, 54, 68, 0);
        }
}
.pzl-sale-pill {
        position: relative;
        display: inline-flex;
        align-items: center;
        gap: 0.55rem;
        padding: 0.46rem 1.2rem;
        border-radius: 999px;
        background: linear-gradient(135deg, #ff1451 0%, #ff5e62 100%) !important;
        color: #fff !important;
        font-weight: 800;
        letter-spacing: 0.02em;
        line-height: 1;
        box-shadow: 0 8px 22px rgba(255, 20, 81, 0.38);
        text-decoration: none !important;
        white-space: nowrap;
}

.pzl-sale-pill:hover,
.pzl-sale-pill:focus {
        color: #fff;
        text-decoration: none;
}

.header-links .pzl-sale-pill-wrap {
        display: flex;
        margin-right: 72px;
}

#top .pzl-sale-pill {
        margin-left: 24px;
        margin-right: 0;
}

#top .pzl-sale-pill-wrap {
        display: inline-flex;
}

@media (max-width: 480px) {
        .pzl-countdown {
                font-size: 1.05rem;
                padding: 0.65rem 1rem;
        }
}

body.common-home .pzl-sale-pill {
        background: linear-gradient(135deg, #ff1451 0%, #ff5e62 100%) !important;
        color: #fff !important;
        box-shadow: 0 10px 26px rgba(255, 20, 81, 0.4) !important;
}

.pzl-ann-message p {
        margin: 0.25rem 0 0.75rem;
        font-size: 1.05rem;
}

.pzl-ann-message strong {
        font-weight: 700;
}

.pzl-ann-message ul,
.pzl-ann-message ol {
        margin: 0.25rem 0 0.75rem 0.9rem;
}

@keyframes pzlRing {
        0% {
                box-shadow: 0 0 0 0 rgba(255, 20, 81, 0.5);
        }

        70% {
                box-shadow: 0 0 0 14px rgba(255, 20, 81, 0);
        }

        100% {
                box-shadow: 0 0 0 0 rgba(255, 20, 81, 0);
        }
}

@keyframes pzlDotPulse {
        0%,
        100% {
                transform: scale(1);
        }

        50% {
                transform: scale(1.25);
        }
}

@media (prefers-reduced-motion: reduce) {
        .pzl-sale-pill .pzl-dot {
                animation: none;
        }
}

.pzl-sale-modal-body {
        text-align: center;
}

.pzl-sale-modal-image {
        margin-bottom: 1rem;
}

.pzl-sale-modal-image img {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.pzl-sale-modal-message {
        margin-bottom: 0.75rem;
        text-align: left;
}

.pzl-sale-modal-countdown {
        text-align: center;
}

.pzl-countdown-modal {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 12rem;
        padding: 0.45rem 1.25rem;
        border-radius: 999px;
        background: rgba(217, 54, 68, 0.18);
        color: #b3242f;
        font-size: 1.125rem;
        font-weight: 700;
        letter-spacing: 0.04em;
}

.pzl-countdown-modal.pzl-countdown-ended {
        background: rgba(119, 119, 119, 0.18);
        color: #555;
}

/* Custom modal sizing and centering */
.pzl-sale-modal-dialog {
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: calc(100vh - 60px);
}

.pzl-sale-modal .modal-dialog {
        position: relative;
        top: 50%;
        transform: translateY(-50%);
}

.pzl-sale-modal-content {
        border-radius: 8px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
        overflow: hidden;
}

.pzl-sale-modal .modal-body {
        padding: 20px;
}

.pzl-announcement-btn:hover,
.pzl-announcement-btn:focus {
        opacity: 0.9;
        text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
        .pzl-sale-modal-dialog {
                max-width: 90vw !important;
                width: 90vw !important;
        }

        .pzl-sale-modal-content {
                max-height: 85vh !important;
        }

        .pzl-sale-modal-body {
                max-height: calc(85vh - 120px) !important;
        }
}

@media (max-width: 480px) {
        .pzl-sale-modal-dialog {
                max-width: 95vw !important;
                width: 95vw !important;
        }

        .pzl-sale-modal-content {
                max-height: 90vh !important;
        }

        .pzl-sale-modal-body {
                max-height: calc(90vh - 100px) !important;
        }
}
