/* Topvite Popup & Notification Bar v2 - front end */

.tvp { display: none; font-family: inherit; color: var(--tvp-text); line-height: 1.5; }
.tvp.tvp-open { display: block; }
.tvp *, .tvp *::before, .tvp *::after { box-sizing: border-box; }
html.tvp-lock { overflow: hidden; }

/* Notice zones: fixed to the top or bottom, notices stack inside */
.tvp-zone { position: fixed; left: 0; right: 0; z-index: 99990; }
.tvp-zone.tvp-top { top: 0; }
.tvp-zone.tvp-bottom { bottom: 0; }

.tvp-bar {
    position: relative; background: var(--tvp-bg); color: var(--tvp-text);
    padding: 12px 48px 12px 16px; box-shadow: 0 2px 14px rgba(0, 0, 0, .12);
}
.tvp-bar-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.tvp-bar-text { flex: 1 1 280px; font-size: 15px; }
.tvp-bar .tvp-close { top: 50%; margin-top: -14px; }

/* Popup: overlay and centered box */
.tvp-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, var(--tvp-overlay)); z-index: 99998; }
.is-popup .tvp-box {
    position: fixed; left: 50%; top: 50%; translate: -50% -50%;
    width: min(var(--tvp-width), calc(100vw - 32px));
    max-height: calc(100vh - 32px); overflow: auto;
    background: var(--tvp-bg); border-radius: var(--tvp-radius);
    padding: 28px; z-index: 99999;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}
.is-popup .tvp-title { margin: 0 0 10px; font-size: 22px; line-height: 1.3; color: var(--tvp-text); }
.is-popup .tvp-body p { margin: 0 0 12px; }
.tvp-image { display: block; max-width: 100%; height: auto; border-radius: calc(var(--tvp-radius) / 2); margin: 4px 0 14px; }
.tvp-video { position: relative; padding-top: 56%; margin-bottom: 14px; }
.tvp-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Close button */
.tvp-close {
    position: absolute; top: 10px; inset-inline-end: 12px;
    background: none; border: 0; padding: 4px 8px; cursor: pointer;
    font-size: 26px; line-height: 1; color: var(--tvp-text); opacity: .6;
}
.tvp-close:hover { opacity: 1; }

/* Buttons */
.tvp-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.is-popup .tvp-actions { justify-content: center; }
.tvp-btn {
    display: inline-block; padding: 11px 20px; border-radius: var(--tvp-radius);
    border: 2px solid var(--tvp-primary); background: var(--tvp-primary); color: #fff;
    font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
}
.tvp-btn:hover { filter: brightness(1.08); color: #fff; }
.tvp-btn:disabled { opacity: .6; cursor: default; }
.tvp-btn-secondary { background: transparent; color: var(--tvp-primary); }
.tvp-btn-secondary:hover { color: var(--tvp-primary); background: rgba(0, 0, 0, .04); }

/* Countdown */
.tvp-countdown { display: flex; gap: 8px; margin: 0 0 14px; font-variant-numeric: tabular-nums; }
.tvp-cd { flex: 1; text-align: center; padding: 8px 4px; border-radius: calc(var(--tvp-radius) / 2); background: rgba(0, 0, 0, .05); }
.tvp-cd b { display: block; font-size: 22px; color: var(--tvp-primary); }
.tvp-cd small { font-size: 12px; opacity: .75; }

/* Coupon */
.tvp-coupon {
    display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
    border: 2px dashed var(--tvp-primary); border-radius: var(--tvp-radius);
    padding: 10px 12px; margin: 0 0 14px;
}
.tvp-coupon code { font-size: 16px; font-weight: 700; color: var(--tvp-text); }
.tvp-copy {
    margin-inline-start: auto; padding: 6px 12px; cursor: pointer; font: inherit; font-size: 13px;
    border: 1px solid var(--tvp-primary); background: transparent; color: var(--tvp-primary);
    border-radius: calc(var(--tvp-radius) / 2);
}

/* Newsletter */
.tvp-newsletter { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.tvp-newsletter input {
    flex: 1 1 200px; padding: 11px 14px; font: inherit;
    border: 1px solid rgba(0, 0, 0, .2); border-radius: var(--tvp-radius);
    background: #fff; color: #111;
}
.tvp-msg { width: 100%; margin: 0; font-size: 14px; }

.tvp-custom { margin-top: 12px; }

/* Opening effects */
.tvp.tvp-open .tvp-overlay { animation: tvp-fade .25s ease; }
.tvp.tvp-open .tvp-box, .tvp.tvp-open .tvp-bar { animation: tvp-fade .3s ease; }
.tvp.anim-slide.tvp-open .tvp-box { animation: tvp-slide .35s ease; }
.tvp.anim-zoom.tvp-open .tvp-box { animation: tvp-zoom .3s ease; }

@keyframes tvp-fade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes tvp-slide { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes tvp-zoom  { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }

/* Phones */
@media (max-width: 600px) {
    .is-popup .tvp-box { padding: 22px 18px; }
    .is-popup .tvp-title { font-size: 19px; }
    .tvp-bar { padding: 10px 40px 10px 12px; }
    .tvp-bar-text { font-size: 14px; }
}
