/* DoorMan Bridge — визия по оригиналната форма „Заявка Voster"
 *
 * ВАЖНО за размерите: темите и на двата сайта налагат едри шрифтове и високи полета
 * върху table/th/td/input/select (често с по-висока специфичност от нашата). Затова
 * размерите тук са заковани с !important — без това таблицата не се побира на екрана
 * и текстът в менютата се реже.
 */

/* ---------- общи ---------- */
.dm-bulk, .dm-configurator { font-size: 13px; color: #222; }
.dm-bulk { padding: 0 16px 26px; line-height: 1.35; }
.dm-bulk *, .dm-configurator * { box-sizing: border-box; }

.dm-bulk select, .dm-bulk input, .dm-bulk textarea, .dm-configurator select {
    width: 100% !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
    padding: 4px 6px !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    border: 1px solid #cfcfcf !important;
    border-radius: 3px !important;
    background-color: #fff !important;
    color: #222 !important;
    box-shadow: none !important;
    text-overflow: ellipsis;
}
.dm-bulk textarea { line-height: 1.4 !important; padding: 6px 8px !important; }
.dm-bulk select:focus, .dm-configurator select:focus { outline: 2px solid #4caf50; outline-offset: -2px; }

/* ---------- шапка ---------- */
.dm-title {
    background: #4caf50; color: #fff; text-align: center;
    padding: 8px 10px !important; font-size: 14px !important; font-weight: 600; letter-spacing: .3px;
}

/* ---------- клиентски полета (на един ред) ---------- */
.dm-meta {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 14px;
    padding: 12px 14px; background: #fafafa; border: 1px solid #eee; border-top: 0;
}
.dm-meta label { display: block; font-size: 11px !important; color: #555; margin: 0 0 3px !important; }
@media (max-width: 1100px) { .dm-meta { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px)  { .dm-meta { grid-template-columns: 1fr; } }

/* ---------- таблица ---------- */
.dm-tablewrap { overflow-x: auto; }
.dm-bulk table {
    width: 100% !important; min-width: 1060px;
    table-layout: fixed;                 /* иначе браузърът свива колоните до нечетимо */
    border-collapse: collapse; margin: 0 !important;
}
.dm-bulk table, .dm-bulk tr, .dm-bulk td, .dm-bulk th { font-size: 12px !important; line-height: 1.3 !important; }
.dm-bulk thead th {
    background: #1c1c1c !important; color: #fff !important;
    font-size: 10px !important; text-transform: uppercase; letter-spacing: .3px;
    padding: 6px 4px !important; text-align: center; white-space: nowrap; font-weight: 600;
    border: 0 !important;
}
.dm-bulk td { border: 1px solid #e6e6e6; padding: 4px !important; vertical-align: middle; background: #fff; }
.dm-bulk tr.dm-r1 td { border-bottom: 0; }
.dm-bulk tr.dm-r2 td { border-top: 0; background: #fbfbfb; }
.dm-bulk tr.dm-r2 + tr.dm-r1 td { border-top: 2px solid #d8d8d8; }
.dm-bulk td.dm-num { text-align: center; font-weight: 700; color: #555; }

/* ширини: моделът и цветовете носят най-дългите текстове */
.dm-bulk col.c-num   { width: 28px; }
.dm-bulk col.c-model { width: 14%; }
.dm-bulk col.c-color { width: 12%; }
.dm-bulk col.c-size  { width: 9%; }
.dm-bulk col.c-case  { width: 12%; }
.dm-bulk col.c-ccol  { width: 12%; }
.dm-bulk col.c-pcol  { width: 12%; }
.dm-bulk col.c-ext   { width: 11%; }
.dm-bulk col.c-qty   { width: 6%; }
.dm-bulk col.c-price { width: 10%; }
.dm-bulk col.c-del   { width: 34px; }

.dm-sub { font-size: 9px !important; text-transform: uppercase; letter-spacing: .3px;
          color: #777; display: block; margin-bottom: 2px; }

/* ---------- цена ---------- */
.dm-bulk td.dm-price { text-align: right; white-space: nowrap; cursor: pointer; }
.dm-cli { font-weight: 700; color: #222; font-size: 13px !important; }
.dm-dist { display: none; color: #2e7d32; font-weight: 700; font-size: 13px !important; }
.dm-price.show-dist .dm-cli { display: none; }
.dm-price.show-dist .dm-dist { display: block; }
.dm-price small { display: block; font-size: 9px !important; color: #aaa; font-weight: 400; }
.dm-price .dm-qtyhint, .dm-price .dm-qtyhint-dist { color: #777; font-size: 10px !important; }
.dm-price .dm-qtyhint-dist { display: none; }
.dm-price.show-dist .dm-qtyhint { display: none; }
.dm-price.show-dist .dm-qtyhint-dist { display: block; }
.dm-price .dm-qtyhint:empty, .dm-price .dm-qtyhint-dist:empty { display: none !important; }
.dm-warn { color: #c62828; font-size: 10px !important; margin-top: 2px; }

/* ---------- бутони ---------- */
.dm-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 14px 0 4px; }
.dm-btn {
    border: 0 !important; border-radius: 3px !important;
    padding: 8px 14px !important; font-size: 12px !important; line-height: 1.2 !important;
    font-weight: 600; cursor: pointer; color: #fff !important; background: #4caf50 !important;
    margin: 0 !important; width: auto !important; text-transform: none !important;
}
.dm-btn:hover { filter: brightness(1.06); }
.dm-btn[disabled] { opacity: .55; cursor: default; }
.dm-btn.red { background: #c62828 !important; }
.dm-btn.ghost { background: #fff !important; color: #333 !important; border: 1px solid #cfcfcf !important; }
.dm-btn.dark { background: #1c1c1c !important; }
.dm-x { padding: 4px 8px !important; font-size: 12px !important; }
.dm-total { margin-left: auto; text-align: right; }
.dm-total.has-dist { cursor: pointer; }
.dm-total .t-cli { font-size: 15px !important; font-weight: 800; }
.dm-total .t-dist { display: none; font-size: 15px !important; color: #2e7d32; font-weight: 800; }
.dm-total.show-dist .t-cli { display: none; }
.dm-total.show-dist .t-dist { display: block; }
.dm-msg { font-size: 11px !important; color: #555; }

/* ---------- визуализация ---------- */
.dm-prev-h { background: #1c1c1c; color: #fff; padding: 6px 10px; font-size: 10px !important;
             letter-spacing: .3px; margin-top: 16px; }
.dm-prev-grid { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px; border: 1px solid #eee; border-top: 0; }
.dm-pcard { width: 112px; border: 1px solid #e6e6e6; border-radius: 3px; overflow: hidden; background: #fff; }
.dm-pimg { height: 92px; display: flex; align-items: center; justify-content: center; background: #fff; }
.dm-pimg img { max-width: 100%; max-height: 90px; object-fit: contain; }
.dm-plabel { background: #4caf50; color: #fff; padding: 4px 5px; }
.dm-pcat { font-size: 9px !important; text-transform: uppercase; opacity: .85; }
.dm-pname { font-size: 10px !important; font-weight: 600; line-height: 1.25; }

/* ---------- конфигуратор на продуктовата страница ---------- */
.dm-configurator { margin: 16px 0; padding: 14px; border: 1px solid #ddd; border-radius: 8px; background: #fafafa; }
.dm-configurator h4 { margin: 0 0 12px; font-size: 15px !important; }
.dm-cfg-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
@media (max-width: 600px) { .dm-cfg-rows { grid-template-columns: 1fr; } }
.dm-cfg-rows label { display: block; font-size: 11px !important; color: #555; margin-bottom: 3px; }
.dm-cfg-foot { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #ccc; }
.dm-cfg-price { color: #2e7d32; font-weight: 800; font-size: 18px !important; }
