/* ═══════════════════════════════════════════════════════════════════════════
   Профил на клиента: прозорец, табове, „Моите поръчки“, „Детайли на поръчката“ (menu.php).
   Зарежда се ПОСЛЕДЕН (след menu.css и theme-light.css) и работи и в тъмна, и в светла тема чрез променливи --pf-*.
   Правила: без сенки (рамки вместо тях), радиуси като на сайта — чипове 6px, бутони 10px, карти 12px; цели за докосване ≥ 44px;
   нищо не прелива хоризонтално (min-width:0 на всички flex/grid деца).
   ═══════════════════════════════════════════════════════════════════════════ */

#profile-modal, #order-detail-modal, #add-address-modal {
    --pf-bg: #141418;
    --pf-s1: #1c1c22;
    --pf-s2: #25252d;
    --pf-line: rgba(255, 255, 255, .10);
    --pf-tx: #f3f3f6;
    --pf-mu: #a3a3ae;
    --pf-ac: #e15829;
    --pf-ac-tx: #ff8a5c;
    --pf-ac-bg: rgba(225, 88, 41, .15);
    --pf-ok: #4ade80;   --pf-ok-bg: rgba(74, 222, 128, .14);
    --pf-warn: #fbbf24; --pf-warn-bg: rgba(251, 191, 36, .14);
    --pf-info: #7db4ff; --pf-info-bg: rgba(96, 165, 250, .16);
    --pf-bad: #ff8d8d;  --pf-bad-bg: rgba(248, 113, 113, .15);
}
html[data-theme="light"] #profile-modal, html[data-theme="light"] #order-detail-modal, html[data-theme="light"] #add-address-modal {
    --pf-bg: #ffffff;
    --pf-s1: #f5f6f8;
    --pf-s2: #eceef2;
    --pf-line: rgba(0, 0, 0, .10);
    --pf-tx: #17181c;
    --pf-mu: #60636b;
    --pf-ac: #e15829;
    --pf-ac-tx: #c4451a;
    --pf-ac-bg: rgba(225, 88, 41, .10);
    --pf-ok: #15803d;   --pf-ok-bg: rgba(21, 128, 61, .10);
    --pf-warn: #92600a; --pf-warn-bg: rgba(180, 120, 10, .13);
    --pf-info: #1d5fc2; --pf-info-bg: rgba(29, 95, 194, .10);
    --pf-bad: #b42318;  --pf-bad-bg: rgba(180, 35, 24, .10);
}

/* ── Прозорец: плътен фон (преди беше наполовина прозрачен и през него се четяха продуктите) ── */
#profile-modal .profile-modal-content,
#order-detail-modal .order-detail-modal-content {
    background: var(--pf-bg) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    color: var(--pf-tx);
    border: 1px solid var(--pf-line) !important;
    border-radius: 16px;
}
#order-detail-modal .order-detail-modal-content { max-width: 640px; width: 96%; }
#profile-modal .modal-header, #order-detail-modal .modal-header {
    background: var(--pf-bg) !important;
    border-bottom: 1px solid var(--pf-line) !important;
    color: var(--pf-tx);
}
#profile-modal .modal-header h3, #order-detail-modal .modal-header h3 { color: var(--pf-tx); }
#profile-modal .modal-body { background: var(--pf-bg); }

/* ── Табове: един ред, който на телефон се плъзга настрани; активният е ясно отличен ── */
#profile-modal .profile-tabs-wrapper {
    background: var(--pf-bg) !important;
    border-bottom: 1px solid var(--pf-line) !important;
    padding: 10px 12px 0 !important;
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
#profile-modal .profile-tabs {
    display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding-bottom: 0;
}
#profile-modal .profile-tabs::-webkit-scrollbar { display: none; }
#profile-modal .profile-tabs.fade-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 38px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 38px), transparent); }
#profile-modal .profile-tabs.fade-l { -webkit-mask-image: linear-gradient(270deg, #000 calc(100% - 38px), transparent); mask-image: linear-gradient(270deg, #000 calc(100% - 38px), transparent); }
#profile-modal .profile-tabs.fade-l.fade-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 38px, #000 calc(100% - 38px), transparent); mask-image: linear-gradient(90deg, transparent, #000 38px, #000 calc(100% - 38px), transparent); }
#profile-modal .tab-btn {
    flex: 1 0 auto; min-width: 84px; scroll-snap-align: center;
    min-height: 58px; padding: 9px 12px 10px; gap: 5px;
    color: var(--pf-mu) !important; background: transparent !important;
    border: 0 !important; border-bottom: 3px solid transparent !important; border-radius: 10px 10px 0 0 !important;
    font-size: 15px;
}
#profile-modal .tab-btn i { font-size: 18px; }
#profile-modal .tab-btn:hover { color: var(--pf-tx) !important; background: var(--pf-s1) !important; }
#profile-modal .tab-btn.active {
    color: var(--pf-ac-tx) !important; background: var(--pf-ac-bg) !important; border-bottom-color: var(--pf-ac) !important;
}
@media (max-width: 768px) {
    #profile-modal .profile-tabs-wrapper { padding: 8px 8px 0 !important; }
    #profile-modal .tab-btn { min-width: 76px; padding: 8px 10px 9px; font-size: 14px; }
    #profile-modal .tab-content { padding: 14px 12px 28px !important; }
}
#profile-modal .tab-content { background: var(--pf-bg); }

/* ═══════════ Статус ═══════════ */
.mo-status {
    display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto;
    padding: 6px 12px; border-radius: 8px; font-size: 14px; font-weight: 700; line-height: 1; white-space: nowrap;
    background: var(--pf-s2); color: var(--pf-mu);
}
.mo-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.mo-st-pending    { background: var(--pf-warn-bg); color: var(--pf-warn); }
.mo-st-preparing  { background: var(--pf-info-bg); color: var(--pf-info); }
.mo-st-preparing .mo-dot, .mo-st-delivering .mo-dot { animation: moPulse 1.4s ease-in-out infinite; }
.mo-st-ready      { background: var(--pf-ok-bg); color: var(--pf-ok); }
.mo-st-delivering { background: var(--pf-info-bg); color: var(--pf-info); }
.mo-st-done       { background: var(--pf-ok-bg); color: var(--pf-ok); }
.mo-st-cancelled  { background: var(--pf-bad-bg); color: var(--pf-bad); }
@keyframes moPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .mo-st-preparing .mo-dot, .mo-st-delivering .mo-dot { animation: none; } }

/* ═══════════ Бутони ═══════════ */
.mo-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    min-height: 46px; padding: 11px 16px; border-radius: 10px; min-width: 0;
    background: var(--pf-s1); color: var(--pf-tx) !important; border: 1px solid var(--pf-line);
    font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none !important; cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}
.mo-btn i { font-size: 15px; flex: 0 0 auto; }
.mo-btn:hover { background: var(--pf-s2); border-color: var(--pf-ac); }
.mo-btn:focus-visible { outline: 2px solid var(--pf-ac); outline-offset: 2px; }
.mo-btn-primary { background: var(--pf-ac) !important; border-color: var(--pf-ac) !important; color: #fff !important; }
.mo-btn-primary:hover { background: #c94c20 !important; border-color: #c94c20 !important; }
.mo-btn-receipt { background: var(--pf-ac-bg); border-color: var(--pf-ac); color: var(--pf-ac-tx) !important; }
.mo-btn-receipt:hover { background: var(--pf-ac); color: #fff !important; }

/* ═══════════ „Моите поръчки“ — списък ═══════════ */
#profile-modal .orders-container {
    display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start;
}
@media (min-width: 900px) {
    #profile-modal .orders-container { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
#profile-modal .orders-container > .orders-pagination,
#profile-modal .orders-container > .empty-state,
#profile-modal .orders-container > .orders-loading { grid-column: 1 / -1; }

.mo-card {
    display: flex; flex-direction: column; gap: 12px; min-width: 0;
    background: var(--pf-s1); border: 1px solid var(--pf-line); border-radius: 12px; padding: 16px;
    color: var(--pf-tx);
}
.mo-card.trackable { cursor: pointer; border-color: color-mix(in srgb, var(--pf-ac) 45%, var(--pf-line)); }
.mo-card.trackable:hover { border-color: var(--pf-ac); }
.mo-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.mo-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mo-ic { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; background: var(--pf-ac-bg); color: var(--pf-ac-tx); font-size: 18px; }
.mo-id-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mo-id-txt b { font-size: 19px; line-height: 1.1; color: var(--pf-tx); overflow-wrap: anywhere; }
.mo-id-txt small { font-size: 14px; color: var(--pf-mu); }
.mo-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mo-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 6px; background: var(--pf-s2); color: var(--pf-mu); font-size: 13px; font-weight: 700; line-height: 1.2; }
.mo-chip i { font-size: 12px; }
.mo-chip-pts { background: var(--pf-warn-bg); color: var(--pf-warn); }
.mo-chip-warn { background: var(--pf-info-bg); color: var(--pf-info); }
.mo-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--pf-line); }
.mo-items li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--pf-line); font-size: 16px; }
.mo-q { color: var(--pf-ac-tx); font-weight: 800; min-width: 26px; }
.mo-n { overflow-wrap: anywhere; line-height: 1.3; }
.mo-p { text-align: right; white-space: nowrap; font-weight: 700; }
.mo-p .lv, .od2-iprice .lv, .od2-row .lv, .mo-total .lv { color: var(--pf-mu); font-size: .8em; font-weight: 600; }
.mo-items .mo-more { display: block; color: var(--pf-mu); font-size: 14px; padding: 9px 0; }
.mo-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.mo-total span { color: var(--pf-mu); font-size: 15px; }
.mo-total strong { font-size: 23px; color: var(--pf-ac-tx); line-height: 1.1; }
.mo-total strong b { font-weight: 800; }
.mo-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
@media (min-width: 560px) { .mo-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mo-actions .mo-track { grid-column: 1 / -1; } }
.mo-actions .mo-detail:last-child { grid-column: 1 / -1; }
.mo-card .myorder-charity, .mo-card .myorder-refund-badge { margin: 0; }

/* Пагинация */
#profile-modal .orders-pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
#profile-modal .op-btn {
    min-width: 44px; min-height: 44px; border-radius: 10px; background: var(--pf-s1); color: var(--pf-tx);
    border: 1px solid var(--pf-line); font-family: inherit; font-size: 16px; font-weight: 700; cursor: pointer;
}
#profile-modal .op-btn:hover:not(:disabled) { border-color: var(--pf-ac); }
#profile-modal .op-btn.active { background: var(--pf-ac); border-color: var(--pf-ac); color: #fff; }
#profile-modal .op-btn:disabled { opacity: .4; cursor: default; }
#profile-modal .orders-loading, #profile-modal .empty-state { color: var(--pf-mu); }
#profile-modal .empty-state h3 { color: var(--pf-tx); }

/* ═══════════ „Детайли на поръчката“ ═══════════ */
#order-detail-modal .modal-body { padding: 14px 16px 22px; background: var(--pf-bg); }
.od2 { display: flex; flex-direction: column; gap: 12px; }
.od2 section, .od2 .od2-card { min-width: 0; }
.od2-hero { background: var(--pf-s1); border: 1px solid var(--pf-line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.od2-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.od2-date { color: var(--pf-mu); font-size: 14px; }
.od2-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.od2-total span { color: var(--pf-mu); font-size: 16px; }
.od2-total strong { font-size: 32px; line-height: 1.05; color: var(--pf-ac-tx); }
.od2-total strong b { font-weight: 800; }
.od2-total strong .lv { font-size: .45em; color: var(--pf-mu); }
.od2-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.od2-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 6px; background: var(--pf-s2); color: var(--pf-tx); font-size: 14px; font-weight: 700; }
.od2-chip i { font-size: 13px; color: var(--pf-mu); }
.od2-chip.ok { background: var(--pf-ok-bg); color: var(--pf-ok); } .od2-chip.ok i { color: var(--pf-ok); }
.od2-chip.save { background: var(--pf-warn-bg); color: var(--pf-warn); } .od2-chip.save i { color: var(--pf-warn); }

.od2-receipt {
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; align-items: center;
    background: var(--pf-ac-bg); border: 1px solid var(--pf-ac); border-radius: 12px; padding: 14px 16px;
}
.od2-receipt-ic { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 10px; background: var(--pf-ac); color: #fff; font-size: 20px; }
.od2-receipt-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.od2-receipt-txt b { font-size: 17px; color: var(--pf-tx); }
.od2-receipt-txt small { font-size: 13px; color: var(--pf-mu); line-height: 1.35; }
.od2-receipt-btns { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

.od2-card { background: var(--pf-s1); border: 1px solid var(--pf-line); border-radius: 12px; padding: 14px 16px; }
.od2-card h4 { margin: 0 0 8px; display: flex; align-items: center; gap: 9px; font-size: 17px; color: var(--pf-tx); text-transform: none; letter-spacing: 0; }
.od2-card h4 i { color: var(--pf-ac-tx); font-size: 15px; width: 18px; text-align: center; }
.od2-items { list-style: none; margin: 0; padding: 0; }
.od2-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--pf-line); font-size: 16px; }
.od2-item:first-child { border-top: 0; }
.od2-qty { color: var(--pf-ac-tx); font-weight: 800; min-width: 28px; }
.od2-iname { overflow-wrap: anywhere; line-height: 1.3; }
.od2-iprice { text-align: right; white-space: nowrap; font-weight: 700; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.od2-iprice s { color: var(--pf-mu); font-size: 13px; font-weight: 600; }
.od2-badge { display: inline-block; padding: 2px 7px; border-radius: 6px; background: var(--pf-ok-bg); color: var(--pf-ok); font-size: 12px; font-weight: 800; vertical-align: middle; }
.od2-empty { color: var(--pf-mu); padding: 8px 0; }
.od2-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 0; border-top: 1px solid var(--pf-line); font-size: 16px; }
.od2-card h4 + .od2-row { border-top: 0; }
.od2-row > span:first-child { color: var(--pf-mu); flex: 0 0 auto; max-width: 48%; }
.od2-row > span:last-child { text-align: right; min-width: 0; overflow-wrap: anywhere; font-weight: 700; }
.od2-row.od2-save > span { color: var(--pf-ok); }
.od2-row.od2-grand { border-top: 2px solid var(--pf-tx); margin-top: 6px; padding-top: 12px; }
.od2-row.od2-grand > span:first-child { color: var(--pf-tx); font-weight: 800; }
.od2-row.od2-grand > span:last-child { font-size: 22px; color: var(--pf-ac-tx); font-weight: 800; }
.od2-code { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--pf-ac-bg); color: var(--pf-ac-tx); font-size: .85em; letter-spacing: .5px; }
.od2-ok { color: var(--pf-ok); }
.od2-pay { display: inline-block; padding: 3px 10px; border-radius: 6px; background: var(--pf-s2); }
.od2-pay-paid { background: var(--pf-ok-bg); color: var(--pf-ok); }
.od2-pay-pending, .od2-pay-unpaid { background: var(--pf-warn-bg); color: var(--pf-warn); }
.od2-pay-cancelled, .od2-pay-failed { background: var(--pf-bad-bg); color: var(--pf-bad); }
.od2-points { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 12px; background: var(--pf-warn-bg); color: var(--pf-warn); font-size: 16px; }
.od2-points i { font-size: 18px; } .od2-points b { color: var(--pf-warn); }
.od2-charity .myorder-charity { margin: 0; }
.od2-refund { border-color: var(--pf-info); background: var(--pf-info-bg); }
.od2-refund h4 i { color: var(--pf-info); }

/* ═══════════ Телефон: по-стегнат разред, нищо не излиза от екрана ═══════════ */
@media (max-width: 560px) {
    .mo-card { padding: 14px; }
    .mo-ic { width: 38px; height: 38px; font-size: 16px; }
    .mo-id { gap: 10px; }
    .mo-id-txt b { font-size: 17px; }
    .mo-id-txt small { font-size: 13px; white-space: nowrap; }
    .mo-status { padding: 5px 8px; font-size: 12.5px; gap: 6px; }
    .od2-total strong { font-size: 28px; }
    #order-detail-modal .modal-body { padding: 12px 12px 22px; }
    .od2-row { gap: 12px; }
    .od2-row > span:first-child { max-width: 44%; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Останалите табове на профила: Профил (формуляр), Адреси, Устройства, Любими, Points — същият вид като „Поръчки“
   ═══════════════════════════════════════════════════════════════════════════ */

/* — Заглавия на секции (Адреси / Устройства / Любими) — */
#profile-modal .section-header { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin: 0 0 16px; padding: 0; border: 0; }
#profile-modal .section-title-wrapper { flex: 1 1 240px; min-width: 0; }
#profile-modal .section-title { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 21px; color: var(--pf-tx); }
#profile-modal .section-title i { color: var(--pf-ac-tx); font-size: 18px; }
#profile-modal .section-description { margin: 5px 0 0; padding: 0; text-align: left; color: var(--pf-mu); font-size: 15px; line-height: 1.4; }
#profile-modal .section-header > .btn-secondary,
#profile-modal #add-address-btn {
    min-height: 46px; padding: 11px 18px; border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer;
    background: var(--pf-ac) !important; border: 1px solid var(--pf-ac) !important; color: #fff !important; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
}
#profile-modal #logout-all-devices-btn { background: var(--pf-s1) !important; border: 1px solid var(--pf-line) !important; color: var(--pf-tx) !important; }
#profile-modal #logout-all-devices-btn:hover { border-color: var(--pf-bad) !important; color: var(--pf-bad) !important; }
#profile-modal .section-header > .btn-secondary:hover:not(#logout-all-devices-btn) { background: #c94c20 !important; }
@media (max-width: 560px) { #profile-modal .section-header > .btn-secondary { width: 100%; } }

/* — Адреси — */
#profile-modal .addresses-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 900px) { #profile-modal .addresses-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
#profile-modal .address-column { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
#profile-modal .address-column-title { margin: 0; display: flex; align-items: center; justify-content: flex-start; gap: 10px; color: var(--pf-mu); font-size: 15px; font-weight: 700; text-transform: none; letter-spacing: 0; }
#profile-modal .address-count { margin-left: auto; background: var(--pf-s2); color: var(--pf-mu); border-radius: 6px; padding: 3px 9px; font-size: 13px; }
#profile-modal .address-card, #profile-modal .device-card {
    background: var(--pf-s1); border: 1px solid var(--pf-line); border-radius: 12px; padding: 14px 16px; margin: 0; width: auto; box-shadow: none !important; color: var(--pf-tx);
}
#profile-modal .address-card.active, #profile-modal .device-card.current { background: var(--pf-ac-bg); border-color: var(--pf-ac); }
#profile-modal .address-card-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
#profile-modal .address-title { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 17px; font-weight: 800; color: var(--pf-tx); }
#profile-modal .address-title i { color: var(--pf-ac-tx); }
#profile-modal .address-status-badge, #profile-modal .device-current-badge {
    background: var(--pf-ok-bg) !important; color: var(--pf-ok) !important; border-radius: 6px; padding: 4px 9px; font-size: 12px; font-weight: 800; box-shadow: none !important; border: 0;
}
#profile-modal .address-text { margin: 8px 0 10px; font-size: 16px; line-height: 1.4; color: var(--pf-tx); overflow-wrap: anywhere; }
#profile-modal .address-card-actions, #profile-modal .address-actions { display: flex; gap: 8px; flex-wrap: wrap; }
#profile-modal .address-action-btn, #profile-modal .device-logout-btn {
    min-width: 44px; min-height: 44px; border-radius: 10px; background: var(--pf-s2); border: 1px solid var(--pf-line); color: var(--pf-tx); cursor: pointer; display: inline-grid; place-items: center;
}
#profile-modal .address-action-btn:hover, #profile-modal .device-logout-btn:hover { border-color: var(--pf-ac); color: var(--pf-ac-tx); }
#profile-modal .address-date, #profile-modal .address-added { color: var(--pf-mu); font-size: 13px; }

/* — Устройства — */
#profile-modal .devices-list { display: flex; flex-direction: column; gap: 10px; }
#profile-modal .device-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }
#profile-modal .device-card-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; background: var(--pf-ac-bg); color: var(--pf-ac-tx); font-size: 18px; }
#profile-modal .device-card-body { min-width: 0; }
#profile-modal .device-card-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 17px; font-weight: 800; color: var(--pf-tx); overflow-wrap: anywhere; }
#profile-modal .device-card-meta { margin-top: 3px; color: var(--pf-mu); font-size: 14px; }

/* — Формуляр „Профил“ — */
#profile-modal .profile-form { gap: 16px; }
#profile-modal .form-row { gap: 16px; }
@media (max-width: 768px) { #profile-modal .form-row { gap: 16px; } }
#profile-modal .form-group { gap: 7px; }
#profile-modal .form-group label { color: var(--pf-tx); font-size: 15px; font-weight: 700; }
#profile-modal .form-group label i { color: var(--pf-ac-tx); width: 18px; text-align: center; }
#profile-modal .form-group input, #profile-modal .form-group select, #profile-modal .form-group textarea {
    min-height: 48px; padding: 12px 14px; border-radius: 10px; font-size: 16px;
    background: var(--pf-s1); border: 1px solid var(--pf-line); color: var(--pf-tx); box-shadow: none !important; width: 100%;
}
#profile-modal .form-group input::placeholder { color: var(--pf-mu); opacity: .8; }
#profile-modal .form-group input:focus, #profile-modal .form-group select:focus, #profile-modal .form-group textarea:focus {
    outline: 2px solid var(--pf-ac); outline-offset: 1px; border-color: var(--pf-ac); background: var(--pf-s1);
}
#profile-modal .form-group input[readonly] { background: var(--pf-s2); color: var(--pf-mu); }
#profile-modal .theme-switch-section { background: var(--pf-s1); border: 1px solid var(--pf-line); border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; }
#profile-modal .theme-switch-label { color: var(--pf-tx); font-weight: 800; font-size: 16px; }
#profile-modal .theme-switch-hint { color: var(--pf-mu); }
#profile-modal .theme-switch-btn { min-height: 46px; border-radius: 10px; font-size: 15px; background: var(--pf-s2); border: 1px solid var(--pf-line); color: var(--pf-tx); }
#profile-modal .theme-switch-btn.active, #profile-modal .theme-switch-btn[aria-checked="true"] { background: var(--pf-ac-bg); border-color: var(--pf-ac); color: var(--pf-ac-tx); }
#profile-modal .form-actions .btn-primary { min-height: 48px; border-radius: 10px; font-size: 16px; }
#profile-modal .form-actions .btn-secondary { min-height: 48px; border-radius: 10px; font-size: 15px; background: var(--pf-s1); border: 1px solid var(--pf-line); color: var(--pf-tx); }
#profile-modal .empty-state i { color: var(--pf-ac); opacity: .55; }
#profile-modal .empty-state p { color: var(--pf-mu); }

/* Адреси: без вложено превъртане (прозорецът сам скролира) и без украсата върху активната карта */
#profile-modal .other-addresses-list { max-height: none; overflow: visible; padding-right: 0; gap: 10px; }
#profile-modal .address-card.active::before, #profile-modal .address-card.active:before { display: none; }

/* ═══════════ Без влачене настрани и без „зуум“ при скрол (iOS Safari) ═══════════
   Същата защита като при прозореца на продукта (#product-modal в menu.css): достатъчни са 1–2px излишна ширина, за да може на телефон
   цялото съдържание да се влачи настрани и да излезе извън екрана. Тук: нищо не се превърта хоризонтално, жестът е само вертикален
   (touch-action: pan-y изключва и щипане/двойно докосване за мащабиране вътре), а преливането не „изтича“ към страницата отдолу. */
#profile-modal, #order-detail-modal { overflow: hidden; overscroll-behavior: none; touch-action: pan-y; }
#profile-modal .profile-modal-content,
#order-detail-modal .order-detail-modal-content { overflow-x: hidden !important; overscroll-behavior: contain; touch-action: pan-y; max-width: 100%; }
/* ВНИМАНИЕ: тук НЕ се ползва overflow-x:hidden — то прави вътрешния контейнер отделна зона за превъртане и чупи залепената (sticky) лента с табове:
   тя се изтласква 56px надолу под заглавието. overflow-x:clip клипва без да създава зона за превъртане; само профилният прозорец (.profile-modal-content) скролира. */
#profile-modal .modal-body, #order-detail-modal .modal-body, #profile-modal .tab-content, #profile-modal .tab-pane { max-width: 100%; overflow-x: clip; }
/* лентата с табове е единственото, което се плъзга настрани — и то само вътре в себе си */
#profile-modal .profile-tabs { touch-action: pan-x pan-y; overscroll-behavior-x: contain; max-width: 100%; }
#profile-modal .profile-tabs-wrapper { max-width: 100%; overflow: hidden; }
body.scroll-locked { left: 0; right: 0; width: 100%; overflow-x: hidden; touch-action: pan-y; }

/* ═══════════ Поле „Дата на раждане“ (type=date): на iPhone е по-широко от контейнера и излиза извън екрана ═══════════
   iOS Safari дава на date полетата собствена минимална ширина и игнорира width:100% — затова махаме родния вид и фиксираме широчината;
   стойността се показва отляво, а изборът на дата пак се отваря с докосване. */
#profile-modal input[type="date"], .form-group input[type="date"] {
    -webkit-appearance: none; appearance: none;
    display: block; box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0 !important;
    -webkit-min-logical-width: calc(100% - 2px);
    min-height: 48px; line-height: 1.2; text-align: left; overflow: hidden; margin: 0;
}
#profile-modal input[type="date"]::-webkit-date-and-time-value, .form-group input[type="date"]::-webkit-date-and-time-value { text-align: left; margin: 0; min-height: 1.2em; }
#profile-modal input[type="date"]::-webkit-datetime-edit, .form-group input[type="date"]::-webkit-datetime-edit { padding: 0; }
#profile-modal input[type="date"]::-webkit-calendar-picker-indicator { margin-left: 6px; }
/* и всички останали полета във формуляра — никога по-широки от колоната си */
#profile-modal .form-group, #profile-modal .form-row { min-width: 0; max-width: 100%; }
#profile-modal .form-group input, #profile-modal .form-group select, #profile-modal .form-group textarea { max-width: 100%; min-width: 0; box-sizing: border-box; }

/* ═══════════ Карта в „Добави нов адрес“: запълва целия квадрат ═══════════
   На телефон контейнерът беше 340px, а картата вътре — 200px (стар мобилен стил), затова се виждаше само отгоре. Картата вече е винаги 100% от контейнера,
   а размерът на контейнера е един и същ на всички екрани (menu.js я преоразмерява и при всяка промяна на размера). */
#add-address-modal .address-map-container { height: 340px; }
#add-address-modal .address-map { height: 100% !important; width: 100%; min-height: 0; }
#add-address-modal .address-map .mapboxgl-map, #add-address-modal .address-map .leaflet-container { height: 100% !important; width: 100% !important; }
@media (max-width: 768px) {
    #add-address-modal .address-map-container { height: 300px; }
}
@media (max-width: 380px) {
    #add-address-modal .address-map-container { height: 260px; }
}

/* ═══════════ „Добави нов адрес“: същият плътен вид; без подвеждащи звездички ═══════════ */
#add-address-modal .modal-content {
    background: var(--pf-bg) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
    color: var(--pf-tx); border: 1px solid var(--pf-line) !important; border-radius: 16px;
}
#add-address-modal .modal-header { background: var(--pf-bg) !important; border-bottom: 1px solid var(--pf-line) !important; }
#add-address-modal .modal-header h3 { color: var(--pf-tx); }
#add-address-modal .modal-body { background: var(--pf-bg); }
/* глобалното правило слага „*“ на ВСЯКА етикета (и на „по избор“, и на „Покажи карта“) — тук необходимите полета са отбелязани в самия текст */
#add-address-modal .form-group label::after, #add-address-modal .form-group label:after { content: none !important; }
#add-address-modal .form-group label { color: var(--pf-tx); font-size: 15px; font-weight: 700; }
#add-address-modal .form-group label i { color: var(--pf-ac-tx); }
#add-address-modal .form-group input:not([type="checkbox"]), #add-address-modal .form-group textarea, #add-address-modal .form-group select {
    min-height: 48px; padding: 12px 14px; border-radius: 10px; font-size: 16px;
    background: var(--pf-s1); border: 1px solid var(--pf-line); color: var(--pf-tx); box-shadow: none !important; max-width: 100%; min-width: 0; box-sizing: border-box;
}
#add-address-modal .form-group input:focus, #add-address-modal .form-group textarea:focus { outline: 2px solid var(--pf-ac); outline-offset: 1px; border-color: var(--pf-ac); }
#add-address-modal .form-group input::placeholder, #add-address-modal .form-group textarea::placeholder { color: var(--pf-mu); opacity: .8; }
#add-address-modal .address-map-container { border: 1px solid var(--pf-line); box-shadow: none; background: var(--pf-s1); }

/* ═══════════ „Добави нов адрес“ — подредба (компютър и телефон) ═══════════ */
#add-address-modal .modal-content { max-width: 620px; width: 96%; }
#add-address-modal .modal-body { padding: 18px 20px 0; }
#add-address-form { display: flex; flex-direction: column; gap: 18px; }
#add-address-form .form-group { margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
#add-address-modal .address-input-container { position: relative; display: flex; align-items: stretch; gap: 8px; }
#add-address-modal .address-input-container input { flex: 1 1 auto; width: auto; }
#add-address-modal .location-btn {
    flex: 0 0 48px; width: 48px; min-height: 48px; border-radius: 10px; display: grid; place-items: center; cursor: pointer;
    background: var(--pf-s1); border: 1px solid var(--pf-line); color: var(--pf-ac-tx);
}
#add-address-modal .location-btn:hover { border-color: var(--pf-ac); background: var(--pf-ac-bg); }
#add-address-modal .address-suggestions {
    background: var(--pf-bg); border: 1px solid var(--pf-line); border-radius: 10px; box-shadow: none; color: var(--pf-tx); z-index: 20;
}
#add-address-modal .map-toggle-container { margin: 4px 0 0; padding: 0; }
#add-address-modal .toggle-label { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; color: var(--pf-tx); font-weight: 700; }
#add-address-modal .toggle-text { color: var(--pf-tx); font-size: 15px; }
#add-address-modal .address-map-container { margin-top: 2px; }
#add-address-modal .map-control-btn { background: var(--pf-bg); color: var(--pf-tx); border: 1px solid var(--pf-line); border-radius: 8px; min-width: 38px; min-height: 38px; box-shadow: none; }
#add-address-modal .map-control-btn:hover { border-color: var(--pf-ac); color: var(--pf-ac-tx); }
#add-address-modal .checkbox-group { display: flex; align-items: center; gap: 12px; min-height: 44px; background: var(--pf-s1); border: 1px solid var(--pf-line); border-radius: 10px; padding: 8px 14px; }
#add-address-modal .checkbox-group input[type="checkbox"] { width: 22px; height: 22px; min-height: 0; flex: 0 0 auto; accent-color: var(--pf-ac); margin: 0; }
#add-address-modal .checkbox-group label { margin: 0; font-size: 15px; cursor: pointer; }
/* бутонът за запис е винаги видим най-долу, докато формулярът се превърта */
#add-address-modal .form-actions {
    position: sticky; bottom: 0; z-index: 5; margin: 0 -20px; padding: 14px 20px 18px;
    background: var(--pf-bg); border-top: 1px solid var(--pf-line);
}
#add-address-modal .form-actions .btn-primary { min-height: 50px; border-radius: 10px; font-size: 16px; width: 100%; }
@media (max-width: 560px) {
    #add-address-modal .modal-body { padding: 14px 14px 0; }
    #add-address-modal .form-actions { margin: 0 -14px; padding: 12px 14px calc(14px + env(safe-area-inset-bottom, 0px)); }
}

/* ═══════════ Sushido Points — същият плътен вид като останалите табове (без оранжев градиент, без сенки) ═══════════ */
#profile-modal #points-tab { color: var(--pf-tx); }
#profile-modal .loyalty-loading, #profile-modal .loyalty-empty { color: var(--pf-mu) !important; padding: 28px 14px; font-size: 15px; }
#profile-modal .loyalty-loading i { color: var(--pf-ac-tx); }
#profile-modal .loyalty-content > * { min-width: 0; }

/* Герой: баланс + ранг — в стила на сайта: черно поле, голям бял надпис, оранжев пръстен като около ястие,
   зелени кръгчета и оранжева „разкъсана четка“ най-отдолу (същото като на началната страница) — и в двете теми */
#profile-modal .loyalty-hero {
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; gap: 0;
    background: #0a0a0a !important; color: #fff !important;
    border: 0 !important; border-radius: 12px; padding: 26px 18px 0; box-shadow: none !important;
    position: relative; overflow: hidden; isolation: isolate; min-height: 292px;
}
#profile-modal .loyalty-hero::before {
    content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
    background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 300' preserveAspectRatio='xMidYMid meet'><circle cx='400' cy='118' r='96' fill='none' stroke='%23e15829' stroke-width='15'/><circle cx='400' cy='118' r='136' fill='none' stroke='%23e15829' stroke-opacity='.65' stroke-width='1.5' stroke-dasharray='3 7'/><circle cx='150' cy='60' r='7' fill='none' stroke='%2339b54a' stroke-width='3'/><circle cx='655' cy='92' r='6' fill='none' stroke='%2339b54a' stroke-width='3'/><circle cx='700' cy='215' r='8' fill='none' stroke='%2339b54a' stroke-width='3'/><circle cx='110' cy='190' r='6' fill='none' stroke='%2339b54a' stroke-width='3'/><circle cx='560' cy='40' r='5' fill='none' stroke='%2339b54a' stroke-width='3'/><ellipse cx='250' cy='40' rx='3' ry='5' fill='%23ffffff' fill-opacity='.85' transform='rotate(19 250 40)'/><ellipse cx='300' cy='215' rx='3' ry='5' fill='%23ffffff' fill-opacity='.85' transform='rotate(50 300 215)'/><ellipse cx='520' cy='230' rx='3' ry='5' fill='%23ffffff' fill-opacity='.85' transform='rotate(51 520 230)'/><ellipse cx='610' cy='165' rx='3' ry='5' fill='%23ffffff' fill-opacity='.85' transform='rotate(121 610 165)'/><ellipse cx='190' cy='125' rx='3' ry='5' fill='%23ffffff' fill-opacity='.85' transform='rotate(65 190 125)'/><ellipse cx='680' cy='30' rx='3' ry='5' fill='%23ffffff' fill-opacity='.85' transform='rotate(45 680 30)'/><ellipse cx='90' cy='95' rx='3' ry='5' fill='%23ffffff' fill-opacity='.85' transform='rotate(2 90 95)'/></svg>") 50% 0 / auto 100% no-repeat;
}
#profile-modal .loyalty-hero::after {
    content: ""; position: absolute; left: 0 !important; right: 0 !important; top: auto !important; bottom: 0; width: auto !important; height: 40%; border-radius: 0 !important; z-index: -1; pointer-events: none; opacity: 1 !important;
    background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 160' preserveAspectRatio='none'><path d='M-10,170 L-10,53 L-4,56 L1,45 L7,52 L18,52 L28,58 L36,43 L44,42 L55,51 L65,53 L71,50 L81,53 L91,53 L102,56 L112,54 L123,53 L129,54 L135,42 L146,56 L154,57 L163,55 L176,55 L181,57 L194,58 L202,46 L209,38 L215,53 L227,51 L236,57 L248,51 L256,55 L262,49 L269,51 L276,47 L284,50 L294,49 L305,44 L316,50 L324,33 L330,43 L336,38 L342,42 L347,48 L354,43 L362,41 L375,44 L380,41 L387,46 L393,47 L399,33 L412,47 L419,43 L430,45 L437,43 L450,48 L462,48 L471,39 L478,45 L491,47 L504,52 L511,46 L517,50 L529,49 L540,46 L553,52 L561,47 L569,52 L577,49 L588,39 L600,37 L613,50 L622,30 L633,48 L641,51 L648,46 L655,48 L663,45 L671,47 L683,47 L692,48 L697,47 L702,50 L711,50 L719,49 L730,46 L737,48 L746,50 L758,50 L767,52 L776,53 L789,55 L801,53 L814,51 L822,53 L828,58 L840,55 L850,55 L863,57 L871,59 L883,57 L892,58 L900,50 L908,56 L918,44 L929,54 L935,61 L941,58 L952,41 L962,53 L972,41 L982,45 L988,59 L996,57 L1003,53 L1010,52 L1015,53 L1023,57 L1032,52 L1037,40 L1046,52 L1059,52 L1067,55 L1075,55 L1088,54 L1099,57 L1106,46 L1117,54 L1123,59 L1133,55 L1141,46 L1148,61 L1157,55 L1165,47 L1174,58 L1183,54 L1188,51 L1196,55 L1205,59 L1210,170 Z' fill='%23c8431a'/><path d='M-10,170 L-10,55 L6,53 L18,53 L33,57 L47,54 L58,59 L73,58 L85,60 L92,57 L99,62 L111,61 L122,58 L135,62 L148,60 L157,61 L170,63 L186,65 L196,66 L209,59 L217,67 L229,54 L242,67 L250,65 L261,63 L269,68 L275,65 L291,64 L299,67 L311,62 L326,62 L337,66 L346,66 L352,61 L363,53 L372,53 L386,62 L399,68 L409,65 L421,65 L430,49 L438,70 L447,67 L457,70 L471,69 L486,69 L493,70 L506,70 L513,61 L522,68 L538,67 L547,69 L555,66 L570,67 L585,69 L592,54 L599,64 L611,67 L621,63 L631,53 L646,60 L659,63 L667,59 L678,63 L693,44 L708,59 L714,59 L728,62 L736,46 L749,62 L762,61 L773,57 L781,63 L791,58 L803,55 L814,61 L822,52 L833,64 L848,61 L856,63 L865,58 L878,60 L891,62 L897,58 L910,57 L923,58 L939,56 L947,55 L956,59 L964,54 L977,48 L985,51 L992,54 L1006,56 L1022,54 L1037,44 L1047,54 L1055,53 L1064,43 L1072,55 L1086,46 L1096,60 L1106,51 L1120,55 L1126,62 L1140,63 L1149,64 L1157,63 L1166,59 L1181,64 L1187,61 L1203,66 L1210,170 Z' fill='%23e15829'/><rect x='880' y='101' width='83' height='1.6' fill='%230a0a0a' fill-opacity='.35'/><rect x='1016' y='81' width='52' height='1.6' fill='%230a0a0a' fill-opacity='.35'/><rect x='621' y='114' width='88' height='1.6' fill='%230a0a0a' fill-opacity='.35'/><rect x='483' y='90' width='131' height='1.6' fill='%230a0a0a' fill-opacity='.35'/><rect x='943' y='93' width='202' height='1.6' fill='%230a0a0a' fill-opacity='.35'/><rect x='161' y='102' width='100' height='1.6' fill='%230a0a0a' fill-opacity='.35'/><rect x='802' y='80' width='113' height='1.6' fill='%230a0a0a' fill-opacity='.35'/><rect x='835' y='74' width='216' height='1.6' fill='%230a0a0a' fill-opacity='.35'/><rect x='69' y='100' width='191' height='1.6' fill='%230a0a0a' fill-opacity='.35'/><rect x='667' y='80' width='159' height='1.6' fill='%230a0a0a' fill-opacity='.35'/><rect x='215' y='74' width='117' height='1.6' fill='%230a0a0a' fill-opacity='.35'/><rect x='172' y='83' width='74' height='1.6' fill='%230a0a0a' fill-opacity='.35'/><rect x='862' y='101' width='164' height='1.6' fill='%230a0a0a' fill-opacity='.35'/><rect x='354' y='84' width='84' height='1.6' fill='%230a0a0a' fill-opacity='.35'/><rect x='853' y='99' width='208' height='1.6' fill='%230a0a0a' fill-opacity='.35'/><rect x='481' y='104' width='220' height='1.6' fill='%230a0a0a' fill-opacity='.35'/></svg>") 0 100% / 100% 100% no-repeat;
}
#profile-modal .lh-balance { padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 190px; }
#profile-modal .lh-balance-label {
    order: -1; margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
    color: #ffffff !important; opacity: .92;
}
#profile-modal .lh-balance-num {
    font-size: 64px; font-weight: 800; line-height: 1; letter-spacing: 0; color: #ffffff !important;
    font-variant-numeric: tabular-nums;
}
#profile-modal .lh-rank {
    position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); white-space: nowrap;
    background: #0a0a0a !important; border: 0 !important; -webkit-backdrop-filter: none; backdrop-filter: none;
    border-radius: 10px; padding: 7px 18px 7px 7px; gap: 12px; min-width: 0; max-width: calc(100% - 28px); text-align: left;
}
#profile-modal .lh-rank i {
    flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px;
    background: #e15829; color: #fff !important; font-size: 17px;
}
#profile-modal .lh-rank-name { font-size: 17px; font-weight: 800; color: #ffffff !important; line-height: 1.2; }
#profile-modal .lh-rank-bonus { font-size: 12.5px; font-weight: 600; color: #ff8a5c !important; opacity: 1; }

/* Бутон „Как работят“ */
#profile-modal .lh-info-btn {
    margin-top: 12px; min-height: 46px; border-radius: 10px; font-size: 15px; font-weight: 700;
    background: transparent !important; border: 1px solid var(--pf-line) !important; color: var(--pf-tx) !important;
}
#profile-modal .lh-info-btn i { color: var(--pf-ac-tx); }
#profile-modal .lh-info-btn:hover { border-color: var(--pf-ac) !important; background: var(--pf-ac-bg) !important; }

/* Напредък към следващия ранг */
#profile-modal .loyalty-progress {
    margin-top: 12px; background: var(--pf-s1) !important; border: 1px solid var(--pf-line) !important; border-radius: 12px; padding: 16px 18px; box-shadow: none !important;
}
#profile-modal .lp-progress-head {
    display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap;
    font-size: 16px; font-weight: 700; color: var(--pf-tx) !important; margin-bottom: 10px;
}
#profile-modal .lp-progress-head span:last-child { color: var(--pf-ac-tx); font-size: 14px; }
#profile-modal .lp-progress-bar { height: 10px; border-radius: 6px; background: var(--pf-s2) !important; }
#profile-modal .lp-progress-fill { border-radius: 6px; background: var(--pf-ac) !important; }
#profile-modal .lh-perks { font-style: normal; font-size: 14px; color: var(--pf-mu) !important; margin: 12px 0 0; line-height: 1.5; }
#profile-modal .lh-perks:empty { display: none; }

/* Заглавия на секции */
#profile-modal .loyalty-section-title {
    font-size: 17px; font-weight: 800; color: var(--pf-tx) !important; margin: 26px 0 4px; gap: 10px;
    padding-bottom: 0; border: 0;
}
#profile-modal .loyalty-section-title i {
    width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px;
    background: var(--pf-ac-bg); color: var(--pf-ac-tx) !important; font-size: 14px;
}
#profile-modal .loyalty-section-hint { color: var(--pf-mu) !important; font-size: 14px; margin: 0 0 14px; }

/* Магазин за ваучери */
#profile-modal .loyalty-shop { grid-template-columns: repeat(auto-fill, minmax(min(168px, 100%), 1fr)); gap: 12px; }
#profile-modal .loyalty-shop-card {
    background: var(--pf-s1) !important; border: 1px solid var(--pf-line) !important; border-radius: 12px; padding: 18px 14px 14px;
    box-shadow: none !important; transform: none !important; gap: 8px; min-width: 0;
}
#profile-modal .loyalty-shop-card:not(.locked):hover { border-color: var(--pf-ac) !important; transform: none !important; }
#profile-modal .loyalty-shop-card.locked { opacity: 1; }
#profile-modal .loyalty-shop-card.locked .ls-discount { color: var(--pf-mu) !important; }
#profile-modal .ls-discount { font-size: 32px; font-weight: 800; color: var(--pf-ac-tx) !important; }
#profile-modal .ls-name { color: var(--pf-tx) !important; font-size: 14px; font-weight: 600; min-height: 0; text-align: center; overflow-wrap: anywhere; }
#profile-modal .ls-cost {
    display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--pf-tx) !important;
    background: var(--pf-s2); border-radius: 6px; padding: 4px 10px;
}
#profile-modal .ls-cost i { color: var(--pf-ac-tx) !important; }
#profile-modal .ls-buy {
    min-height: 44px; border-radius: 10px; font-size: 14px; font-weight: 800; margin-top: 4px;
    background: var(--pf-ac) !important; color: #fff !important; border: 0; box-shadow: none; line-height: 1.2;
}
#profile-modal .ls-buy:disabled { background: var(--pf-s2) !important; color: var(--pf-mu) !important; }

/* Моите ваучери + кредит */
#profile-modal .loyalty-myvouchers { gap: 10px; }
#profile-modal .loyalty-myvoucher {
    background: var(--pf-s1) !important; border: 1px solid var(--pf-line) !important; border-left: 4px solid var(--pf-ac) !important; border-radius: 12px;
    padding: 14px 16px; gap: 12px; flex-wrap: wrap; min-width: 0;
}
#profile-modal .loyalty-myvoucher.credit { border-left-color: var(--pf-ok) !important; }
#profile-modal .loyalty-myvoucher.credit .lmv-disc { color: var(--pf-ok) !important; }
#profile-modal .lmv-left { min-width: 0; gap: 8px 10px; }
#profile-modal .lmv-disc { font-size: 24px; font-weight: 800; color: var(--pf-ac-tx) !important; }
#profile-modal .lmv-left code {
    background: var(--pf-s2) !important; color: var(--pf-tx) !important; border-radius: 6px; padding: 5px 10px; font-size: 14px; letter-spacing: .06em;
    overflow-wrap: anywhere; user-select: all;
}
#profile-modal .lmv-reason { background: var(--pf-warn-bg) !important; color: var(--pf-warn) !important; border: 0 !important; border-radius: 6px; font-size: 12px; padding: 3px 8px; }
#profile-modal .lmv-right small { color: var(--pf-mu) !important; }
#profile-modal .lmv-right strong { color: var(--pf-tx) !important; }
#profile-modal .credit-blocked-note { background: var(--pf-warn-bg) !important; color: var(--pf-warn) !important; border: 0 !important; border-radius: 10px; }
#profile-modal .loyalty-myvouchers.is-blocked { opacity: .6; }

/* История */
#profile-modal .loyalty-history {
    background: var(--pf-s1); border: 1px solid var(--pf-line); border-radius: 12px; padding: 4px 16px;
}
#profile-modal .loyalty-hist-row { padding: 13px 0; gap: 12px; border-bottom: 1px solid var(--pf-line) !important; min-width: 0; }
#profile-modal .loyalty-hist-row:last-of-type { border-bottom: 0 !important; }
#profile-modal .lhr-info { min-width: 0; }
#profile-modal .lhr-info strong { color: var(--pf-tx) !important; font-size: 15px; }
#profile-modal .lhr-info small { color: var(--pf-mu) !important; font-size: 13px; overflow-wrap: anywhere; }
#profile-modal .lhr-points { flex: 0 0 auto; font-size: 18px; font-weight: 800; }
#profile-modal .lhr-points.pos { color: var(--pf-ok) !important; }
#profile-modal .lhr-points.neg { color: var(--pf-bad) !important; }
#profile-modal .lh-pager { border-top: 1px solid var(--pf-line) !important; margin: 0; padding: 10px 0 12px; }
#profile-modal .lh-pager-btn {
    width: 44px; height: 44px; border-radius: 10px; background: var(--pf-s2) !important; border: 1px solid var(--pf-line) !important; color: var(--pf-tx) !important; font-size: 18px;
}
#profile-modal .lh-pager-btn:disabled { opacity: .4; }
#profile-modal .lh-pager-info { color: var(--pf-mu) !important; font-size: 14px; }

@media (max-width: 560px) {
    #profile-modal .loyalty-hero { padding: 22px 12px 0; min-height: 268px; }
    #profile-modal .lh-balance { min-height: 172px; }
    #profile-modal .lh-balance-num { font-size: 58px; }
    #profile-modal .lh-rank { bottom: 14px; }
    #profile-modal .lh-rank-name { font-size: 16px; }
    #profile-modal .loyalty-shop { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    #profile-modal .loyalty-history { padding: 2px 12px; }
}
@media (max-width: 560px) {
    #profile-modal .ls-buy { padding: 8px 6px; font-size: 13px; }
    #profile-modal .loyalty-shop-card { padding: 16px 10px 12px; }
}


/* Бележка „в зоната за доставка ли е“ под картата при добавяне на адрес (същият вид като в касата) */
.addr-point-chip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; padding: 10px 14px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--pf-text, #f1f1f1); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); }
.addr-point-chip.ok { background: rgba(46,160,90,.14); border-color: rgba(46,160,90,.45); }
.addr-point-chip.ok > i { color: #3ecf7a; }
.addr-point-chip.bad { background: rgba(225,60,41,.14); border-color: rgba(225,60,41,.5); }
.addr-point-chip.bad > i { color: #ff6b57; }
.addr-point-chip b { margin-left: auto; padding: 3px 10px; border-radius: 8px; background: rgba(225,88,41,.18); color: #ffb08f; font-size: 13px; }
.addr-point-chip em { flex-basis: 100%; font-style: normal; font-weight: 500; font-size: 12.5px; color: #ffc27a; }
html[data-theme="light"] .addr-point-chip { color: #17181c; background: #f6f7f9; border-color: rgba(0,0,0,.12); }
html[data-theme="light"] .addr-point-chip.ok { background: #e8f6ee; border-color: rgba(46,160,90,.5); }
html[data-theme="light"] .addr-point-chip.bad { background: #fdeceb; border-color: rgba(225,60,41,.5); }
html[data-theme="light"] .addr-point-chip b { background: rgba(225,88,41,.12); color: #b8441a; }
html[data-theme="light"] .addr-point-chip em { color: #a85d00; }

/* ── Портфейл (таб „Портфейл“): точки · ваучери · кредит на едно място + списъци под тях ── */
#profile-modal .wallet { margin: 0 0 18px; }
#profile-modal .wallet-grid { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 16px; }
#profile-modal .wallet-grid.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#profile-modal .wallet-grid.n1 { grid-template-columns: minmax(0, 1fr); }
#profile-modal .wal-tile { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; padding: 12px 12px 14px; border-radius: 12px; border: 1px solid var(--pf-line); background: var(--pf-s1); color: var(--pf-tx); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s ease, transform .15s ease; }
#profile-modal .wal-tile:hover { border-color: var(--pf-ac); }
#profile-modal .wal-tile:active { transform: scale(.98); }
#profile-modal .wal-tile::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--wal-c, var(--pf-ac)); opacity: .9; }
#profile-modal .wal-tile.pts { --wal-c: var(--pf-ac); }
#profile-modal .wal-tile.vch { --wal-c: var(--pf-ok); }
#profile-modal .wal-tile.crd { --wal-c: #e15829; }
#profile-modal .wal-tile.empty::after { opacity: .3; }
#profile-modal .wal-tile i { font-size: 15px; color: var(--wal-c, var(--pf-ac)); }
#profile-modal .wal-tile .wal-k { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--pf-mu); }
#profile-modal .wal-tile .wal-v { font-family: 'Zaglaviq', Arial, sans-serif; font-size: 26px; font-weight: 400; line-height: 1.1; color: var(--pf-tx); overflow-wrap: anywhere; }
#profile-modal .wal-tile.empty .wal-v { color: var(--pf-mu); }
#profile-modal .wal-tile .wal-s { font-size: 11.5px; line-height: 1.3; color: var(--pf-mu); }
#profile-modal .wal-tile .wal-s.warn { color: var(--pf-warn); font-weight: 700; }
#profile-modal .wal-count:not(:empty) { display: inline-block; margin-left: 6px; min-width: 22px; padding: 1px 7px; border-radius: 6px; font: 800 12px/1.5 Arial, sans-serif; text-align: center; color: #fff; background: var(--pf-ok); vertical-align: middle; }
html[data-theme="light"] #profile-modal .wal-count:not(:empty) { background: #15803d; }
@media (max-width: 420px) { #profile-modal .wallet-grid { gap: 8px; } #profile-modal .wal-tile { padding: 10px 9px 13px; } #profile-modal .wal-tile .wal-v { font-size: 22px; } #profile-modal .wal-tile .wal-s { font-size: 11px; } }

/* ваучери и кредит в профила: билет + текст в цветовете на профила (тъмна/светла тема) */
#profile-modal .loyalty-myvoucher.vt-mine { background: var(--pf-s1); border: 1px solid var(--pf-line); border-left: 1px solid var(--pf-line); color: var(--pf-tx); border-radius: 12px; }
#profile-modal .loyalty-myvoucher.vt-mine .vt-info strong { color: var(--pf-tx); }
#profile-modal .loyalty-myvoucher.vt-mine .vt-info code { background: var(--pf-s2); color: var(--pf-tx); }
#profile-modal .loyalty-myvoucher.vt-mine .vt-info small { color: var(--pf-mu); }
#profile-modal .loyalty-myvoucher.vt-mine .vt-info small.soon { color: var(--pf-warn); font-weight: 700; }
#profile-modal .loyalty-myvoucher.vt-mine.credit { border-color: rgba(225, 88, 41, .45); border-left-color: rgba(225, 88, 41, .45); background: var(--pf-s1); }
#profile-modal .is-blocked .loyalty-myvoucher.vt-mine { opacity: .55; }

/* ── Портфейл: компактни редове + падащо меню при повече от 2 ── */
#profile-modal .loyalty-myvouchers { gap: 8px; }
#profile-modal .loyalty-myvoucher.vt-mine { gap: 12px; padding: 9px 12px; border-radius: 10px; }
#profile-modal .loyalty-myvoucher.vt-mine .vt { height: 36px; }
#profile-modal .loyalty-myvoucher.vt-mine .vt .vt-ico { width: 26px; margin: 6px 0; font-size: 12px; }
#profile-modal .loyalty-myvoucher.vt-mine .vt b { font-size: 20px; padding: 0 11px 0 8px; }
#profile-modal .loyalty-myvoucher.vt-mine .vt b small { font-size: 10px; margin-top: -6px; }
#profile-modal .loyalty-myvoucher.vt-mine .vt.vt-credit b { font-size: 17px; }
#profile-modal .loyalty-myvoucher.vt-mine .vt-line { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-width: 0; }
#profile-modal .loyalty-myvoucher.vt-mine .vt-info strong { display: inline; font-size: 13.5px; line-height: 1.3; overflow-wrap: anywhere; }
#profile-modal .loyalty-myvoucher.vt-mine .vt-info code { margin: 0; padding: 1px 7px; font-size: 12px; }
#profile-modal .loyalty-myvoucher.vt-mine .vt-info small { margin-top: 2px; font-size: 11.5px; line-height: 1.35; }
#profile-modal .loyalty-myvoucher.vt-mine .vt-of { font-size: 11.5px; color: var(--pf-mu); }
#profile-modal .loyalty-myvouchers.has-more { gap: 0; }
#profile-modal .loyalty-myvouchers.has-more > .loyalty-myvoucher { margin-bottom: 8px; }
#profile-modal .wal-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .38s cubic-bezier(.4, 0, .2, 1); }
#profile-modal .wal-more.open { grid-template-rows: 1fr; }
#profile-modal .wal-more-in { overflow: hidden; min-height: 0; display: flex; flex-direction: column; gap: 8px; opacity: 0; transition: opacity .3s ease; }
#profile-modal .wal-more.open .wal-more-in { opacity: 1; }
#profile-modal .wal-more.open { margin-bottom: 8px; }
#profile-modal .wal-toggle { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 40px; padding: 8px 12px; border-radius: 10px; border: 1px dashed var(--pf-line); background: transparent; color: var(--pf-mu); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease; }
#profile-modal .wal-toggle:hover { border-color: var(--pf-ac); color: var(--pf-ac-tx); background: var(--pf-ac-bg); }
#profile-modal .wal-toggle i { font-size: 11px; transition: transform .3s ease; }
#profile-modal .wal-toggle.open i { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { #profile-modal .wal-more, #profile-modal .wal-more-in, #profile-modal .wal-toggle i { transition: none; } }
#profile-modal .loyalty-myvoucher.vt-mine, #profile-modal .loyalty-myvoucher.vt-mine.credit { border-left-width: 1px !important; border-left-style: solid !important; border-left-color: var(--pf-line) !important; }
#profile-modal .loyalty-myvoucher.vt-mine.credit { border-color: rgba(225, 88, 41, .4) !important; }
#profile-modal #lh-vouchers-hint { margin: 0 0 10px; font-size: 12.5px; line-height: 1.45; }
/* Портфейл: въздух между „Ранг“ и плочките, и между плочките и списъците */
#profile-modal .wallet { margin: 20px 0 18px; }
#profile-modal .loyalty-progress + .wallet, #profile-modal #lh-progress-wrap + .wallet { margin-top: 20px; }
#profile-modal .wallet-grid { margin-bottom: 20px; }
#profile-modal #lh-vouchers-title { margin-top: 4px; }
#profile-modal #lh-credit-section { margin-top: 20px; }

/* „(по желание)“ до име на адреса (25.10.2026) */
.opt-label { font-weight: 500; opacity: .7; font-size: .9em; }
