/* Shared discount UI, isolated from Bootstrap and other storefront modules. */
.ds-sale,
.ds-admin {
    --ds-accent: var(--rd-accent, #e8762a);
    --ds-text: var(--rd-text, #e8eaf2);
    --ds-muted: var(--rd-muted, #8a92a8);
    --ds-panel: var(--rd-surface, #111520);
    --ds-border: var(--rd-border, #1e2640);
    color: var(--ds-text);
    font-family: var(--rd-font-body, "Inter", sans-serif);
}
.ds-sale *, .ds-admin * { box-sizing: border-box; }
.ds-sale[hidden], .ds-sale [hidden], .ds-admin [hidden] { display: none !important; }
.ds-sale {
    position: relative;
    margin: 0 0 24px;
    padding: clamp(20px, 3vw, 32px);
    overflow: hidden;
    border: 1px solid rgba(232, 118, 42, .35);
    border-top: 3px solid var(--ds-accent);
    border-radius: 16px;
    background: radial-gradient(ellipse at 100% 0, rgba(232, 118, 42, .18), transparent 60%), linear-gradient(125deg, #181922, #10141f 70%);
    box-shadow: 0 14px 38px rgba(0, 0, 0, .18);
}
.ds-sale-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.ds-sale-copy { max-width: 780px; min-width: 0; }
.ds-kicker { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; color: #f4a265; font-size: 11px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.ds-sale-game { padding: 3px 7px; border: 1px solid rgba(244, 162, 101, .22); border-radius: 4px; color: var(--ds-muted); font-size: 10px; }
.ds-sale h2 { margin: 0 0 10px; color: var(--ds-text); font-family: var(--rd-font-head, "Exo 2", sans-serif); font-size: clamp(24px, 3vw, 36px); font-weight: 750; line-height: 1.15; overflow-wrap: anywhere; }
.ds-sale-copy p { max-width: 680px; margin: 0; color: #afb5c7; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.ds-sale-value { flex: 0 0 auto; display: grid; gap: 2px; padding: 0 8px 0 20px; text-align: right; }
.ds-sale-value > span { color: #cfad91; font-size: 12px; }
.ds-sale-value > strong { color: #ffac68; font-family: var(--rd-font-head, "Exo 2", sans-serif); font-size: clamp(42px, 5vw, 66px); font-weight: 800; line-height: 1; letter-spacing: -.04em; white-space: nowrap; }
.ds-sale-offers { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 10px; }
.ds-sale-offer { display: flex; min-width: 0; flex-direction: column; gap: 9px; padding: 16px; border: 1px solid rgba(255, 255, 255, .09); border-radius: 10px; background: rgba(8, 11, 18, .45); color: var(--ds-text); text-decoration: none; transition: background .18s ease, border-color .18s ease; }
.ds-sale-offer:hover { border-color: rgba(232, 118, 42, .7); background: rgba(232, 118, 42, .08); color: #fff; }
.ds-sale-offer-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ds-sale-offer-top > i { color: #eab687; font-size: 21px; }
.ds-sale-offer-top > strong { padding: 4px 7px; border-radius: 5px; background: rgba(232, 118, 42, .15); color: #ffb678; font-size: 15px; line-height: 1.25; }
.ds-sale-offer-name { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 24px; margin-top: 3px; font-size: 14px; font-weight: 650; }
.ds-sale-offer-name > i { flex: 0 0 auto; color: var(--ds-muted); font-size: 12px; }
.ds-sale-offer time { margin-top: auto; color: #a9b1c7; font-size: 11px; line-height: 1.6; }
.ds-sale-offer time span { white-space: nowrap; }
.ds-sale-countdown { color: #e7c1a0; font-size: 11px; }
.ds-sale-footnote { display: flex; align-items: baseline; gap: 7px; margin-top: 16px; color: #919aae; font-size: 11px; line-height: 1.5; }
.ds-sale-footnote i { color: #c39a73; }
.ds-price-old { margin-right: .35em; color: var(--rd-muted, #8a92a8); font-size: .72em; font-weight: 400; text-decoration: line-through; white-space: nowrap; }
.ds-price-badge { display: inline-flex; align-items: center; margin-left: .4em; padding: .22em .5em; border: 1px solid rgba(232, 118, 42, .25); border-radius: 5px; background: rgba(232, 118, 42, .13); color: #ffb678; font-size: 12px; font-weight: 700; line-height: 1.3; vertical-align: middle; white-space: nowrap; }
.ds-price-note { display: block; margin-top: 7px; color: #dda879; font-size: 12px; font-weight: 400; line-height: 1.5; }
.rd-admin-buy-price .ds-price-badge { color: #ffb678; font-size: 12px; }
.rd-admin-buy-price .ds-price-note { color: #dda879; font-size: 12px; }
/* Privilege comparison: two clear durations, one shared promotion. */
.rd-pricing-grid > .col { min-width: 0; }
.rd-pricing-grid .rd-btn { min-width: 0; white-space: normal; }
.ds-vip-periods { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr)); gap: 12px; }
.ds-vip-period { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; border-radius: 10px; background: rgba(255, 255, 255, .025); }
.ds-vip-period-label { color: var(--rd-muted, #8a92a8); font-size: 12px; font-weight: 500; line-height: 1.5; }
.ds-vip-amount { color: var(--rd-text, #e8eaf2); font-family: var(--rd-font-head, "Exo 2", sans-serif); font-size: clamp(24px, 2.4vw, 32px); font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ds-vip-old { color: var(--rd-muted, #8a92a8); font-size: 13px; line-height: 1.4; }
.ds-vip-sale { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 12px; }
.ds-vip-pricing .ds-price-badge { margin: 0; font-size: 11px; }
.ds-vip-pricing .ds-price-note { margin: 0; color: var(--rd-muted, #8a92a8); font-size: 11px; overflow-wrap: anywhere; }
/* Keep the deadline with the price, with breathing room above the CTA. */
.rd-skin-info .rd-skin-price-row:has(+ .ds-price-note) { margin-bottom: 0; }
.rd-skin-info > .ds-price-note { margin: 6px 0 16px; color: var(--rd-muted, #8a92a8); font-size: 11px; line-height: 1.6; }
.ds-admin { width: min(1380px, calc(100% - 40px)); margin: 30px auto 64px; }
.ds-admin-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 30px; margin-bottom: 20px; border: 1px solid var(--ds-border); border-radius: 16px; background: radial-gradient(ellipse at 0 0, rgba(232, 118, 42, .13), transparent 70%), var(--ds-panel); }
.ds-admin h1, .ds-admin h2, .ds-admin h3 { color: var(--ds-text); font-family: var(--rd-font-head, "Exo 2", sans-serif); overflow-wrap: anywhere; }
.ds-admin h1 { margin: 0 0 8px; font-size: clamp(26px, 4vw, 38px); font-weight: 750; }
.ds-admin h2 { margin: 0 0 8px; font-size: 21px; font-weight: 700; }
.ds-admin h3 { margin: 0; font-size: 17px; font-weight: 650; }
.ds-admin-hero p, .ds-panel-head p { max-width: 760px; margin: 0; color: var(--ds-muted); font-size: 14px; line-height: 1.65; }
.ds-admin-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.ds-stat { padding: 18px 20px; border: 1px solid var(--ds-border); border-radius: 12px; background: var(--ds-panel); }
.ds-stat strong { display: block; color: var(--ds-text); font-family: var(--rd-font-head, sans-serif); font-size: 27px; }
.ds-stat span { color: var(--ds-muted); font-size: 12px; }
.ds-admin-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; gap: 20px; }
.ds-panel { min-width: 0; padding: 24px; border: 1px solid var(--ds-border); border-radius: 14px; background: var(--ds-panel); }
.ds-panel-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.ds-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
.ds-field { display: flex; flex-direction: column; min-width: 0; gap: 7px; color: #d6d9e3; font-size: 13px; font-weight: 600; }
.ds-field-wide { grid-column: 1 / -1; }
.ds-admin input:not([type="checkbox"]):not([type="hidden"]), .ds-admin select, .ds-admin textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #2b344b; border-radius: 8px; background: #0b0f19; color: var(--ds-text); font-family: inherit; font-size: 13px; font-weight: 400; color-scheme: dark; }
.ds-admin textarea { min-height: 92px; resize: vertical; }
.ds-admin input::placeholder, .ds-admin textarea::placeholder { color: #75819a; }
.ds-admin small, .ds-field > small, .ds-note { color: var(--ds-muted); font-size: 12px; font-weight: 400; line-height: 1.55; }
.ds-admin fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
.ds-admin legend { float: none; width: auto; margin: 0 0 10px; color: #d6d9e3; font-size: 13px; font-weight: 600; }
.ds-category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.ds-category-option { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 11px 12px; border: 1px solid var(--ds-border); border-radius: 8px; background: #0c111c; color: #bdc5d8; font-size: 13px; cursor: pointer; }
.ds-category-option:has(input:checked) { border-color: rgba(232, 118, 42, .55); background: rgba(232, 118, 42, .09); color: #ffd0aa; }
.ds-category-option.is-unavailable { border-color: var(--ds-border); background: #0c111c; color: #717b90; cursor: not-allowed; }
.ds-admin input[type="checkbox"] { flex: 0 0 auto; width: 17px; height: 17px; margin: 0; accent-color: var(--ds-accent); cursor: pointer; }
.ds-admin input[type="checkbox"]:disabled { cursor: not-allowed; }
.ds-check { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 14px 0; color: #c8cfdf; font-size: 13px; line-height: 1.6; }
.ds-check > label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.ds-check > small { margin-left: 27px; }
.ds-check input { margin-top: 3px !important; }
.ds-actions, .ds-campaign-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.ds-actions { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--ds-border); }
.ds-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 10px 15px; border: 1px solid #303b53; border-radius: 8px; background: #161c2a; color: #dae0ed; font-family: inherit; font-size: 13px; font-weight: 650; line-height: 1.35; text-align: center; text-decoration: none; cursor: pointer; }
.ds-button:hover { border-color: #63708a; background: #1d2638; color: #fff; }
.ds-button-primary { border-color: #e8762a; background: #e8762a; color: #140d08; }
.ds-button-primary:hover { border-color: #f59751; background: #f59751; color: #140d08; }
.ds-button-danger { border-color: rgba(245, 102, 102, .25); background: rgba(245, 102, 102, .08); color: #ff9b9b; }
.ds-button:disabled { opacity: .45; cursor: not-allowed; }
.ds-campaign-list { display: grid; gap: 14px; }
.ds-campaign { padding: 18px; border: 1px solid var(--ds-border); border-radius: 10px; background: #0c111c; overflow-wrap: anywhere; }
.ds-campaign-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 9px; margin-bottom: 12px; }
.ds-status { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 6px; padding: 4px 8px; border: 1px solid #30394d; border-radius: 5px; color: #a2adc2; font-size: 11px; line-height: 1.4; }
.ds-status[data-status="active"] { border-color: rgba(46, 201, 119, .3); background: rgba(46, 201, 119, .09); color: #77dca5; }
.ds-status[data-status="scheduled"] { border-color: rgba(95, 158, 255, .3); background: rgba(95, 158, 255, .09); color: #9bc5ff; }
.ds-status[data-status="ended"] { color: #9aa5ba; }
.ds-status[data-status="disabled"] { border-style: dashed; color: #929bad; }
.ds-campaign-meta { display: flex; flex-wrap: wrap; gap: 7px 12px; margin: 10px 0; color: #a8b2c7; font-size: 12px; line-height: 1.7; }
.ds-campaign-meta strong { color: #ffc18d; }
.ds-campaign p { margin: 8px 0; color: var(--ds-muted); font-size: 12px; line-height: 1.6; }
.ds-campaign-actions { margin-top: 16px; }
.ds-campaign-actions form { margin: 0; }
.ds-campaign-actions .ds-button { font-size: 12px; }
.ds-alert { padding: 15px 18px; margin: 0 0 18px; border: 1px solid #385173; border-radius: 10px; background: rgba(83, 139, 210, .08); color: #c2d4ee; font-size: 13px; line-height: 1.6; }
.ds-alert-danger, .ds-alert.danger, .ds-alert[data-type="danger"], .ds-alert[data-type="error"] { border-color: rgba(233, 92, 92, .4); background: rgba(233, 92, 92, .08); color: #ffb0b0; }
.ds-alert-success, .ds-alert.success, .ds-alert[data-type="success"] { border-color: rgba(46, 201, 119, .35); background: rgba(46, 201, 119, .08); color: #a1eac1; }
.ds-empty { display: grid; justify-items: center; gap: 10px; padding: 38px 20px; border: 1px dashed #30394d; border-radius: 10px; color: var(--ds-muted); font-size: 13px; line-height: 1.6; text-align: center; }
.ds-empty > i { color: #ca8d5a; font-size: 30px; }
.ds-preview { min-width: 0; margin-top: 24px; padding: 22px; border: 1px solid rgba(232, 118, 42, .32); border-top: 2px solid var(--ds-accent); border-radius: 12px; background: radial-gradient(ellipse at 100% 0, rgba(232, 118, 42, .15), transparent 80%), #10141f; overflow-wrap: anywhere; }
.ds-preview [data-preview-title] { margin: 8px 0; color: #f0eae5; font-family: var(--rd-font-head, sans-serif); font-size: 23px; line-height: 1.2; }
.ds-preview [data-preview-percent] { display: inline-block; color: #ffac68; font-family: var(--rd-font-head, sans-serif); font-size: 36px; font-weight: 800; }
.ds-preview [data-preview-description] { margin: 10px 0; color: #b4bfd3; font-size: 13px; line-height: 1.6; }
.ds-preview [data-preview-categories] { display: block; margin: 14px 0; color: #eabf9a; font-size: 12px; line-height: 1.7; }
.ds-preview [data-preview-period], .ds-preview [data-preview-visibility] { display: block; margin-top: 8px; color: #96a2b9; font-size: 11px; line-height: 1.6; }
.ds-sale a:focus-visible, .ds-admin a:focus-visible, .ds-admin button:focus-visible, .ds-admin input:focus-visible, .ds-admin select:focus-visible, .ds-admin textarea:focus-visible { outline: 2px solid #ffb274; outline-offset: 3px; }
@media (max-width: 1100px) {
    .ds-admin-layout { grid-template-columns: minmax(0, 1fr); }
    .ds-campaign-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .ds-admin { width: calc(100% - 24px); margin-top: 18px; }
    .ds-admin-hero { align-items: flex-start; flex-direction: column; padding: 22px; gap: 16px; }
    .ds-admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .ds-stat { padding: 14px 16px; }
    .ds-panel { padding: 18px; }
    .ds-sale-heading { align-items: flex-start; gap: 14px; }
    .ds-sale-value { padding: 0; }
    .ds-sale-value > strong { font-size: 40px; }
    .ds-sale h2 { font-size: 25px; }
    .ds-sale-copy p { font-size: 12px; }
    .ds-sale-offers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ds-sale-offer:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .ds-campaign-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
    .ds-sale { padding: 18px 14px; }
    .ds-sale-heading { position: relative; display: block; padding-top: 1px; }
    .ds-sale .ds-kicker { max-width: calc(100% - 96px); min-height: 43px; align-content: center; }
    .ds-sale-value { position: absolute; right: 0; top: 0; }
    .ds-sale-value > span { font-size: 10px; }
    .ds-sale-value > strong { font-size: 34px; }
    .ds-sale-offer { padding: 12px; }
    .ds-sale-offer-name { font-size: 12px; }
    .ds-sale-offer time, .ds-sale-countdown { font-size: 10px; }
    .ds-form-grid { grid-template-columns: minmax(0, 1fr); }
    .ds-admin .ds-actions > .ds-button { flex: 1 1 100%; }
    .ds-category-grid { grid-template-columns: minmax(0, 1fr); }
    .ds-preview { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .ds-sale-offer { transition: none; }
}
