/* ================================================================
   Registration discount badge
   Visual treatment copied from new site/css/discount-badge.css
   ================================================================ */

@font-face {
    font-family: 'DeleddaSemiBold';
    src: url('/fonts/Deledda_Open_Semibold.ttf?v=2') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

.discount-badge {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 302;
    width: clamp(90px, 8vw, 140px);
    padding: clamp(8px, 1vw, 14px);
    border: 0;
    border-radius: 12px;
    background-color: #ff8738;
    color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    text-align: center;
    font: inherit;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.discount-badge__content {
    position: relative;
    display: block;
}

.discount-badge:hover .badge-text {
    color: #fff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.discount-badge:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.discount-badge.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    animation: badgeBreathing 1.5s ease-in-out infinite;
}

.discount-badge.visible:hover {
    animation: pulse 1.5s infinite;
    filter: brightness(1.1);
}

@media (min-width: 768px) {
    .discount-badge {
        right: clamp(20px, 2vw, 40px);
        bottom: clamp(20px, 2vw, 40px);
    }t
}

@media (max-width: 767px) {
    .discount-badge {
        right: 20px;
        bottom: 110px;
        width: 90px;
        padding: 8px;
    }

    .badge-text,
    .discount {
        font-size: 20px;
    }
}

.badge-text {
    display: block;
    margin-bottom: 12px;
    font-family: 'DeleddaSemiBold', sans-serif;
    font-size: clamp(16px, 1.5vw, 22px);
    font-weight: 600;
    line-height: 1.3;
    -webkit-font-smoothing: antialiased;
}

.discount {
    font-family: 'DeleddaSemiBold', sans-serif;
    font-weight: 600;
    font-size: clamp(16px, 1.5vw, 22px);
}

.badge-image {
    display: block;
    width: 100%;
    margin: -50px 0 0 -5%;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.3));
}

/* Kept available with the copied asset for visual parity with the source badge. */
.badge-branch-left {
    position: absolute;
    top: 45px;
    left: -60px;
    width: 100px;
    pointer-events: none;
    user-select: none;
    filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.25));
}

@keyframes badgeBreathing {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ==================== DISCOUNT MODAL ==================== */
.discount-modal {
    overflow: hidden;
}

.discount-modal__body {
    padding: 28px 28px 30px;
    background: linear-gradient(180deg, #fffaf5 0%, #fff 72%);
    text-align: center;
}

.discount-modal__icon {
    display: grid;
    width: 62px;
    height: 62px;
    margin: 0 auto 12px;
    place-items: center;
    border-radius: 50%;
    background: #fff0e5;
    font-size: 2rem;
}

.discount-modal__amount {
    color: #ef6c2f;
    font-size: clamp(2rem, 8vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1;
}

.discount-modal__lead {
    margin: 10px 0 12px;
    color: var(--gray-800);
    font-size: 1.15rem;
    font-weight: 800;
}

.discount-modal__text {
    max-width: 430px;
    margin: 0 auto 24px;
    color: var(--gray-600);
    font-size: 0.94rem;
    line-height: 1.55;
}

.discount-modal__ok {
    margin-top: 12px;
}

@media (max-width: 767px) {
    .badge-branch-left {
        top: 2px;
        left: -60px;
        width: 100px;
    }
}

@media (max-width: 480px) {
    .badge-branch-left {
        top: 35px;
        left: -50px;
        width: 70px;
    }
}
