/* =========================================================
 * Promotion Popup
 * ========================================================= */

.tv-pp {
    position: fixed;
    inset: 0;
    z-index: 9999998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.tv-pp.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.tv-pp__overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 20, 15, 0.72);
    backdrop-filter: blur(5px);
}

.tv-pp__dialog {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    transform: translateY(24px) scale(0.96);
    transition: transform 0.4s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.tv-pp.is-open .tv-pp__dialog {
    transform: translateY(0) scale(1);
}

.tv-pp__dialog--has-img {
    padding: 0;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.tv-pp__close {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 5;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0 16px 0 12px;
    background: rgba(0, 0, 0, 0.52);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.tv-pp__dialog:not(.tv-pp__dialog--has-img) .tv-pp__close {
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #374151;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.tv-pp__close:hover {
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
}

.tv-pp__dialog:not(.tv-pp__dialog--has-img) .tv-pp__close:hover {
    background: #fff;
    color: #111;
}

.tv-pp__media {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    line-height: 0;
    overflow: hidden;
    background: #f3f4f6;
}

.tv-pp__media img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    vertical-align: top;
}

.tv-pp__ribbon {
    height: 8px;
    background: linear-gradient(90deg, #134e34 0%, #e69500 50%, #134e34 100%);
}

.tv-pp__body {
    padding: 22px 24px 24px;
    text-align: center;
}

.tv-pp__badge {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 12px;
    border-radius: 999px;
    background: #fff8ee;
    border: 1px solid #f0dfc4;
    color: #e69500;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tv-pp__title {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.25;
    color: #134e34;
}

.tv-pp__desc {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.55;
    color: #555;
}

.tv-pp__coupon {
    position: relative;
    margin-bottom: 18px;
}

.tv-pp__coupon-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tv-pp__coupon-code {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border: 2px dashed #e69500;
    border-radius: 10px;
    background: linear-gradient(145deg, #fffbf5, #fff8ee);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.tv-pp__coupon-code:hover {
    background: #fff3e0;
    transform: scale(1.01);
}

.tv-pp__coupon-code.is-copied {
    border-color: #10a877;
    background: #f0fdf4;
}

.tv-pp__coupon-text {
    font-size: 20px;
    font-weight: 900;
    color: #e69500;
    letter-spacing: 0.1em;
}

.tv-pp__coupon-code.is-copied .tv-pp__coupon-text {
    color: #10a877;
}

.tv-pp__coupon-copy {
    display: flex;
    color: #e69500;
    opacity: 0.8;
}

.tv-pp__coupon-toast {
    position: absolute;
    left: 50%;
    bottom: -6px;
    transform: translate(-50%, 100%);
    padding: 4px 10px;
    border-radius: 6px;
    background: #134e34;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.tv-pp__coupon-toast.is-visible {
    opacity: 1;
}

.tv-pp__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tv-pp__btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    background: #134e34;
    color: #fff !important;
    font-size: 15px;
    font-weight: 800;
    text-align: center;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    box-shadow: 0 4px 14px rgba(19, 78, 52, 0.35);
}

.tv-pp__btn:hover {
    background: #0b5c37;
    transform: translateY(-1px);
    color: #fff !important;
}

.tv-pp__skip {
    border: none;
    background: none;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
}

.tv-pp__skip:hover {
    color: #555;
}

@media (max-width: 480px) {
    .tv-pp {
        padding: 12px;
        align-items: center;
    }

    .tv-pp__dialog {
        max-width: 100%;
        border-radius: 16px;
        display: flex;
        flex-direction: column;
    }

    .tv-pp__close {
        border-radius: 0 16px 0 10px;
    }

    .tv-pp__dialog--has-img {
        max-height: calc(100vh - 24px);
    }

    .tv-pp__media img {
        max-height: 35vh;
        object-fit: cover;
    }

    .tv-pp__title {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .tv-pp__desc {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .tv-pp__badge {
        margin-bottom: 6px;
    }

    .tv-pp__coupon {
        margin-bottom: 12px;
    }

    .tv-pp__coupon-code {
        padding: 8px 12px;
    }

    .tv-pp__coupon-text {
        font-size: 16px;
    }

    .tv-pp__btn {
        padding: 10px 16px;
    }

    .tv-pp__body {
        padding: 16px;
        overflow-y: auto;
    }
}

@media (max-height: 600px) {
    .tv-pp__media img {
        max-height: 30vh;
        object-fit: cover;
    }
    .tv-pp__title {
        font-size: 16px;
        margin-bottom: 6px;
    }
    .tv-pp__desc {
        font-size: 12px;
        margin-bottom: 8px;
    }
    .tv-pp__body {
        padding: 12px 16px;
    }
}
