﻿/* Pricing & promotions screens (md-promos). Shared look: accounting.css gl-* classes; day chips: md-rateplans.css md-rp-day. */

/* ---------- shared: dialogs (Promotion / Price Rule editors) ---------- */
.mud-dialog:has(.md-pm-actions) .mud-dialog-content { padding-top: 0; }
.mud-dialog:has(.md-pm-actions) .mud-tabs-tabbar { border-bottom: 1px solid #EEF1F5; }
.md-pm-sec { font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #475467; margin: 6px 0 0;
    padding-bottom: 4px; border-bottom: 1px dashed #E3E8EE; }
.md-pm-note { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 8px; background: #EEF5FB; color: #1F5468;
    font-size: .82rem; line-height: 1.45; }
.md-pm-note .mud-icon-root { flex: 0 0 auto; font-size: 1.1rem; }
.md-pm-note.warn { background: #FFF1D6; color: #7A4B00; }
.md-pm-typebox { border: 1px solid #D6E4F0; background: #F7FAFD; border-radius: 10px; padding: 10px 12px 4px; }
.md-pm-typebox .ttl { font-weight: 700; color: #1F5468; font-size: .86rem; display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.md-pm-hint { font-size: .78rem; color: #667085; margin-top: 2px; }
.md-pm-hint.warn { color: #B54708; }
.md-pm-switches { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; }
.md-pm-days { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.md-pm-days .sep { width: 1px; height: 22px; background: #D0D5DD; margin: 0 4px; }
.md-pm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; }
.md-pm-actions .expl { flex: 1 1 280px; min-width: 0; font-size: .78rem; color: #667085; line-height: 1.4; padding-left: 8px; }
.md-pm-actions .btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }

/* bundle item entry */
.md-pm-additem { display: grid; grid-template-columns: 150px minmax(0, 1fr) 120px 170px auto auto; gap: 8px; align-items: center;
    padding: 10px; border: 1px solid #E3E8EE; border-radius: 10px; background: #FAFBFC; }
@media (max-width: 960px) { .md-pm-additem { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .md-pm-additem { grid-template-columns: minmax(0, 1fr); } }

/* phones: editor dialogs use the whole screen */
@media (max-width: 600px) {
    .mud-dialog.md-pm-dlg, .mud-dialog:has(.md-pm-actions) { margin: 0 !important; width: 100vw !important; max-width: 100vw !important; height: 100dvh; max-height: 100dvh !important;
        border-radius: 0 !important; }
    .mud-dialog:has(.md-pm-actions) .mud-dialog-content { padding-left: 12px; padding-right: 12px; }
    .mud-dialog:has(.md-pm-actions) .mud-dialog-actions { padding: 8px 12px; }
    .md-pm-actions .expl { flex-basis: 100%; padding-left: 0; }
    .md-pm-actions .btns { width: 100%; }
    .md-pm-actions .btns > * { flex: 1 1 auto; }
}

/* ---------- promotions list ---------- */
table.gl-table tbody tr.md-pm-dim td { color: #98A2B3; }
.md-pm-disc { display: inline-block; border-radius: 6px; padding: 2px 8px; font-size: .8rem; font-weight: 600; background: #EEF5FB; color: #1F5468; white-space: nowrap; }
.md-pm-disc.amount { background: #E9F7EF; color: #127A4B; }
.md-pm-disc.rate_plan { background: #EFE7FF; color: #5B3DB5; }
.md-pm-disc.none { background: #F2F4F7; color: #475467; }
.md-pm-mode { display: inline-flex; align-items: center; gap: 3px; border-radius: 999px; padding: 1px 8px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.md-pm-mode.auto { background: #E9F7EF; color: #127A4B; }
.md-pm-mode.code { background: #F2F4F7; color: #344054; }
.md-pm-use { display: flex; flex-direction: column; gap: 3px; min-width: 96px; }
.md-pm-bar { display: block; height: 6px; border-radius: 999px; background: #EEF1F5; overflow: hidden; }
.md-pm-bar > span { display: block; height: 100%; background: #2E9E62; border-radius: 999px; }
.md-pm-bar > span.hi { background: #E5A00D; }
.md-pm-bar > span.full { background: #C0392B; }
.md-pm-link { border: 0; background: #EEF5FB; color: #1F5468; font: inherit; font-weight: 700; border-radius: 8px; padding: 3px 10px; cursor: pointer; }
.md-pm-link:hover { background: #DCEAF6; }
.md-pm-scope { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.md-pm-side-multi .mud-input-control { margin-top: 0; }
.md-pm-side-multi { background: #fff; border-radius: 8px; }
.md-pm-totals { display: flex; flex-direction: column; gap: 2px; }
.md-pm-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0; white-space: normal; }
.md-pm-empty .gl-note { max-width: 440px; }

/* ---------- price rules list ---------- */
.md-pr-promo { display: inline-flex; flex-direction: column; gap: 1px; }
.md-pr-promo .chip { display: inline-block; border-radius: 6px; padding: 1px 7px; font-size: .74rem; font-weight: 700; background: #EFE7FF; color: #5B3DB5;
    white-space: nowrap; width: fit-content; }
.md-pr-promo small { color: #667085; font-size: .74rem; white-space: nowrap; }
.md-pr-adj { font-weight: 700; white-space: nowrap; }
.md-pr-adj.neg { color: #127A4B; }
.md-pr-adj.pos { color: #B42318; }
.md-pr-extras { font-size: .78rem; color: #475467; white-space: nowrap; }
.md-pr-all { color: #667085; font-style: italic; }
