/* ============================================================
   [TBC] Плавающее промо-окно стартовых наборов (нижний левый угол).
   Скидка + «вечный» таймер (tbc_sale_timer). Закрывается в пилюлю.
   ============================================================ */
.promo-widget {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 9000;
    font-family: inherit;
    -webkit-font-smoothing: antialiased;
}

/* ---------- развёрнутая карточка ---------- */
.promo-widget__card {
    position: relative;
    width: 326px;
    max-width: calc(100vw - 24px);
    border-radius: 16px;
    overflow: hidden;
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(245, 166, 35, 0.16) 0%, rgba(0, 0, 0, 0) 55%),
        linear-gradient(160deg, #1b1308 0%, #130d18 55%, #0b0a11 100%);
    border: 1px solid rgba(245, 166, 35, 0.42);
    box-shadow: 0 22px 55px -14px rgba(0, 0, 0, 0.75), inset 0 0 44px rgba(245, 166, 35, 0.05);
    animation: pwIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
    transform-origin: left bottom;
}
.promo-widget__card::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(245, 166, 35, 0.95), transparent);
}
.promo-widget__card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 224, 138, 0.55), rgba(245, 166, 35, 0.12) 45%, rgba(255, 224, 138, 0.5));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    opacity: 0.7;
    animation: pwGlow 4.5s ease-in-out infinite;
}
.promo-widget.is-collapsed .promo-widget__card { display: none; }

.promo-widget__min {
    position: absolute;
    top: 8px; right: 8px;
    z-index: 6;
    width: 26px; height: 26px;
    border-radius: 8px;
    border: 1px solid rgba(245, 166, 35, 0.35);
    background: rgba(0, 0, 0, 0.45);
    color: #e6dcc2;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}
/* минус — SVG rect через FILL. width/height с !important — основной сайт
   (main.css) ресетит ширину svg, иначе иконка схлопывается в 0. */
.promo-widget__min svg { width: 15px !important; height: 15px !important; display: block; flex: 0 0 auto; }
.promo-widget__min:hover { background: rgba(245, 166, 35, 0.22); color: #fff; }

.promo-widget__body { position: relative; z-index: 2; padding: 18px 18px 16px; }

.promo-widget__head { display: flex; align-items: center; gap: 12px; padding-right: 30px; }
.promo-widget__icon {
    flex-shrink: 0;
    width: 48px; height: 48px;
    border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(245, 166, 35, 0.24), rgba(245, 166, 35, 0.05));
    border: 1px solid rgba(245, 166, 35, 0.42);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.promo-widget__icon svg { width: 27px; height: 27px; display: block; }
.promo-widget__icon { animation: pwFloat 4s ease-in-out infinite; }

.promo-widget__titles { min-width: 0; }
.promo-widget__kicker {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #f2c971;
}
.promo-widget__title {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    line-height: 1.22;
    margin-top: 3px;
}
.promo-widget__discount {
    margin-left: auto;
    align-self: flex-start;
    font-size: 20px;
    font-weight: 900;
    color: #1a1206;
    background: linear-gradient(135deg, #ffe08a, #f5a623);
    padding: 5px 11px;
    border-radius: 11px;
    box-shadow: 0 5px 16px -5px rgba(245, 166, 35, 0.8);
    transform: rotate(3deg);
    white-space: nowrap;
    animation: pwPop 2.6s ease-in-out infinite;
}

.promo-widget__sub {
    margin: 13px 0 12px;
    font-size: 12.5px;
    line-height: 1.45;
    color: #cdd2e2;
}
.promo-widget__sub b { color: #ffd98a; }

/* ---------- таймер ---------- */
.promo-widget__ends {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #8b90a8;
    margin-bottom: 7px;
}
.promo-widget__clock { display: flex; align-items: flex-start; gap: 5px; }
.pw-unit {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 2px 6px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(245, 166, 35, 0.18);
}
.pw-unit b {
    font-size: 21px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.pw-unit i {
    font-size: 9px;
    font-style: normal;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #8b90a8;
}
.pw-sep { font-size: 18px; font-weight: 800; color: rgba(245, 166, 35, 0.6); padding-top: 8px; }

/* ---------- CTA ---------- */
.promo-widget__cta {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 11px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: #1a1206;
    background: linear-gradient(135deg, #ffe08a, #f5a623);
    box-shadow: 0 8px 22px -8px rgba(245, 166, 35, 0.8);
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}
.promo-widget__cta span { transition: transform 0.2s ease; font-weight: 900; }
.promo-widget__cta:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 12px 26px -8px rgba(245, 166, 35, 0.9); color: #1a1206; }
.promo-widget__cta:hover span { transform: translateX(4px); }
.promo-widget__cta:active { transform: translateY(0); }
.promo-widget__cta::after {
    content: "";
    position: absolute;
    top: 0; left: -60%;
    width: 45%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    transform: skewX(-18deg);
    animation: pwShine 3.6s ease-in-out infinite;
}

/* ---------- свёрнутая пилюля ---------- */
.promo-widget__reopen {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 9px 15px 9px 12px;
    border-radius: 999px;
    border: 1px solid rgba(245, 166, 35, 0.55);
    background: linear-gradient(110deg, rgba(28, 20, 10, 0.96), rgba(18, 14, 9, 0.96));
    box-shadow: 0 10px 26px -10px rgba(245, 166, 35, 0.65);
    color: #ffe9b8;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    animation: pwReopenPulse 2.4s ease-in-out infinite;
}
.promo-widget.is-collapsed .promo-widget__reopen { display: inline-flex; }
.promo-widget__reopen b { color: #ffcf5d; font-weight: 900; }
.promo-widget__reopen-fire { font-size: 15px; line-height: 1; }
.promo-widget__reopen:hover { border-color: rgba(245, 166, 35, 0.9); }

@keyframes pwIn {
    from { opacity: 0; transform: translateY(16px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pwGlow { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.85; } }
@keyframes pwFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes pwPop { 0%, 100% { transform: rotate(3deg) scale(1); } 50% { transform: rotate(3deg) scale(1.06); } }
@keyframes pwShine { 0% { left: -60%; } 55% { left: 130%; } 100% { left: 130%; } }
@keyframes pwReopenPulse {
    0%, 100% { box-shadow: 0 10px 26px -10px rgba(245, 166, 35, 0.5); }
    50%      { box-shadow: 0 10px 30px -8px rgba(245, 166, 35, 0.85); }
}

@media (max-width: 560px) {
    .promo-widget { left: 12px; bottom: 12px; }
    .promo-widget__card { width: calc(100vw - 24px); }
}
@media (prefers-reduced-motion: reduce) {
    .promo-widget__card, .promo-widget__card::after, .promo-widget__icon,
    .promo-widget__discount, .promo-widget__cta::after, .promo-widget__reopen { animation: none; }
    .promo-widget__cta:hover { transform: none; }
}
