/* ===== نافذة عرض السعر ===== */
.tzq-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(34, 22, 48, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    direction: rtl;
    font-family: 'Cairo', Tahoma, Arial, sans-serif;
}
.tzq-overlay.tzq-open { display: flex; }

.tzq-modal {
    width: 100%;
    max-width: 440px;
    background: #fffaf2;
    border: 1px solid rgba(212, 165, 69, 0.3);
    border-radius: 20px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: tzqPop 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes tzqPop {
    from { opacity: 0; transform: translateY(18px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.tzq-head {
    position: relative;
    padding: 22px 24px;
    color: #fff;
    background: linear-gradient(135deg, #9572b8 0%, #7e5aa3 48%, #6d4b93 100%);
}
.tzq-head h3 { margin: 0; font-size: 19px; font-weight: 900; }
.tzq-head p  { margin: 6px 0 0; font-size: 12.5px; opacity: 0.9; font-weight: 600; }
.tzq-head .tzq-car { margin-top: 4px; font-size: 13px; font-weight: 800; color: #f0d28a; }

.tzq-close {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 30px !important;
    height: 30px !important;
    padding: 0;
    padding-bottom: 4px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    background: rgba(255, 255, 255, 0.18);
    transition: background 0.25s ease;
}
.tzq-close:hover { background: rgba(255, 255, 255, 0.3); }

.tzq-body { padding: 24px; }

.tzq-field { margin-bottom: 18px; }
.tzq-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 800;
    color: #2d1f3f;
}
.tzq-field input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(212, 165, 69, 0.4);
    border-radius: 12px;
    background: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    color: #2d2139;
    box-sizing: border-box;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.tzq-field select {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(212, 165, 69, 0.4);
    border-radius: 12px;
    background: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    color: #2d2139;
    box-sizing: border-box;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237e5aa3' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.tzq-field input:focus,
.tzq-field select:focus {
    outline: none;
    border-color: #7e5aa3;
    box-shadow: 0 0 0 3px rgba(126, 90, 163, 0.15);
}

.tzq-summary {
    margin: 4px 0 20px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(212, 165, 69, 0.1);
    border: 1px solid rgba(212, 165, 69, 0.25);
    font-size: 13px;
    font-weight: 700;
    color: #2d1f3f;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.tzq-summary strong { color: #6d4b93; font-size: 17px; }

.tzq-error {
    display: none;
    margin: -8px 0 14px;
    color: #c0392b;
    font-size: 12.5px;
    font-weight: 700;
}

.tzq-generate {
    width: 100%;
    height: 52px;
    border: none;
    cursor: pointer;
    border-radius: 999px;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 900;
    background: linear-gradient(135deg, #9572b8 0%, #7e5aa3 48%, #6d4b93 100%);
    box-shadow: 0 10px 22px rgba(109, 75, 147, 0.28);
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.tzq-generate:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(109, 75, 147, 0.36); }
.tzq-generate:disabled { opacity: 0.7; cursor: progress; transform: none; }

.tzq-spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tzqSpin 0.7s linear infinite;
    display: none;
}
.tzq-generate.is-loading .tzq-spinner { display: inline-block; }
@keyframes tzqSpin { to { transform: rotate(360deg); } }

/* ============================================================
   نظام السلة: الزر الاستيكي + عناصر العرض + الأنيميشن
   ============================================================ */

/* الزر الاستيكي */
.tzq-sticky {
    position: fixed;
    bottom: 24px;
    inset-inline-start: 24px; /* يسار في RTL */
    left: 24px;
    right: auto !important;
    z-index: 99998;
    display: none;
    width: auto !important;
    max-width: max-content;
    min-width: 0;
    align-items: center;
    gap: 10px;
    height: 56px;
    margin: 0 !important;
    padding: 0 22px 0 16px;
    border: none;
    cursor: pointer;
    border-radius: 999px;
    color: #fff;
    font-family: 'Cairo', Tahoma, Arial, sans-serif;
    font-size: 15px;
    font-weight: 900;
    white-space: nowrap;
    background: linear-gradient(135deg, #9572b8 0%, #7e5aa3 48%, #6d4b93 100%);
    box-shadow: 0 14px 32px rgba(109, 75, 147, 0.42);
    direction: rtl;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.tzq-sticky.is-visible { display: inline-flex !important; }
.tzq-sticky:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(109, 75, 147, 0.5); }
.tzq-sticky i { color: #f0d28a; font-size: 16px; }
.tzq-sticky .tzq-count {
    min-width: 24px; height: 24px; padding: 0 6px;
    border-radius: 999px; background: #fff; color: #6d4b93;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 900;
}
@keyframes tzqPulse { 0% { transform: scale(1); } 30% { transform: scale(1.13); } 100% { transform: scale(1); } }
.tzq-sticky.tzq-pulse { animation: tzqPulse 0.5s ease; }

/* نقطة الطيران */
.tzq-fly {
    position: fixed;
    z-index: 100000;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #9572b8, #6d4b93);
    box-shadow: 0 8px 22px rgba(109, 75, 147, 0.55);
    transform: translate(-50%, -50%);
    transition: transform 0.66s cubic-bezier(0.55, 0.05, 0.3, 1), opacity 0.66s ease;
    pointer-events: none;
}

/* رسالة صغيرة */
.tzq-toast {
    position: fixed;
    bottom: 92px;
    left: 24px;
    z-index: 100001;
    max-width: 280px;
    background: #2d1f3f;
    color: #fff;
    padding: 12px 18px;
    border-radius: 12px;
    font-family: 'Cairo', Tahoma, Arial, sans-serif;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.6;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    direction: rtl;
    pointer-events: none;
}
.tzq-toast.is-show { opacity: 1; transform: none; }

/* صف الإضافة (select + زر) */
.tzq-add-row { display: flex; gap: 8px; margin-bottom: 16px; }
.tzq-add-row .tzq-select {
    flex: 1; height: 48px; padding: 0 14px;
    border: 1px solid rgba(212, 165, 69, 0.4); border-radius: 12px; background: #fff;
    font-family: inherit; font-size: 14px; font-weight: 700; color: #2d2139; cursor: pointer;
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237e5aa3' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: left 14px center;
}
.tzq-add-row .tzq-select:focus { outline: none; border-color: #7e5aa3; box-shadow: 0 0 0 3px rgba(126,90,163,0.15); }
.tzq-add-btn {
    flex-shrink: 0; width: auto !important; height: 48px; padding: 0 18px; border: none; cursor: pointer; border-radius: 12px;
    color: #fff; font-family: inherit; font-size: 14px; font-weight: 900;
    background: linear-gradient(135deg, #9572b8, #6d4b93);
    display: inline-flex; align-items: center; gap: 7px;
    transition: transform 0.2s ease;
}
.tzq-add-btn:hover { transform: translateY(-2px); }
.tzq-add-btn i { color: #f0d28a; font-size: 12px; }

/* قائمة العناصر */
.tzq-items { margin-bottom: 16px; max-height: 40vh; overflow-y: auto; padding: 2px; margin-inline: -2px; }
.tzq-item {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
    border: 1px solid rgba(212, 165, 69, 0.28);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(45, 31, 63, 0.045);
    animation: tzqItemIn 0.35s ease;
}
@keyframes tzqItemIn { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: none; } }

.tzq-item-main { flex: 1 1 130px; min-width: 0; text-align: right; }
.tzq-item-name {
    font-weight: 800; color: #2d1f3f; font-size: 14.5px; line-height: 1.35;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tzq-item-name-link {
    display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-width: 0;
    text-decoration: none !important; cursor: pointer; transition: color 0.2s ease;
}
.tzq-item-name-link .tzq-item-name-txt {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.tzq-item-name-link i { flex: 0 0 auto; font-size: 10px; color: #c0a86b; transition: color 0.2s ease, transform 0.2s ease; }
.tzq-item-name-link:hover { color: #6d4b93; }
.tzq-item-name-link:hover i { color: #6d4b93; transform: translate(-1px, -1px); }
.tzq-item-price { color: #9a8fab; font-size: 11.5px; font-weight: 700; margin-top: 3px; white-space: nowrap; }

/* عدّاد الأيام: − [رقم] + */
.tzq-item-days-wrap {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; gap: 0;
    padding: 3px;
    border: 1px solid rgba(212, 165, 69, 0.45);
    border-radius: 999px; background: #fff;
}
.tzq-item-day-step {
    width: 28px !important; height: 28px !important; flex: 0 0 28px; padding: 0 !important; margin: 0 !important;
    border: none !important; border-radius: 50% !important; cursor: pointer;
    background: rgba(109, 75, 147, 0.08) !important; color: #6d4b93 !important;
    font-size: 18px; font-weight: 900; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background 0.2s ease, transform 0.12s ease; box-shadow: none !important;
}
.tzq-item-day-step:hover { background: rgba(109, 75, 147, 0.18) !important; }
.tzq-item-day-step:active { transform: scale(0.88); }
.tzq-item-days {
    width: 40px !important; min-width: 40px; height: 28px !important; padding: 0 !important; margin: 0 !important;
    text-align: center; border: none !important; background: transparent !important; box-shadow: none !important;
    font-family: inherit; font-weight: 900; font-size: 15px; color: #2d2139;
    -moz-appearance: textfield; appearance: textfield;
}
.tzq-item-days::-webkit-outer-spin-button,
.tzq-item-days::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tzq-item-days:focus { outline: none; }

.tzq-item-end { flex: 0 0 auto; margin-inline-start: auto; display: inline-flex; align-items: center; gap: 10px; }
.tzq-item-total { font-weight: 900; color: #6d4b93; font-size: 14px; white-space: nowrap; }
.tzq-item-del {
    width: 32px !important; height: 32px !important; flex: 0 0 32px; padding: 0 !important; margin: 0 !important;
    border: none !important; cursor: pointer; border-radius: 9px !important;
    background: rgba(192, 57, 43, 0.08) !important; color: #c0392b !important;
    font-size: 13px; line-height: 1; box-shadow: none !important;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background 0.2s ease;
}
.tzq-item-del:hover { background: rgba(192, 57, 43, 0.18) !important; }
.tzq-empty { text-align: center; color: #746d7b; font-size: 13px; padding: 18px 10px; font-weight: 700; line-height: 1.8; }

/* ============================================================
   نافذة اختيار عدد الأيام (قبل الإضافة للسلة)
   ============================================================ */
.tzq-days-overlay {
    position: fixed; inset: 0; z-index: 100000; display: none;
    align-items: center; justify-content: center; padding: 20px;
    background: rgba(34, 22, 48, 0.55);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    direction: rtl; font-family: 'Cairo', Tahoma, Arial, sans-serif;
}
.tzq-days-overlay.tzq-open { display: flex; }
.tzq-days-modal {
    position: relative; width: 100%; max-width: 380px;
    background: #fffaf2; border: 1px solid rgba(212, 165, 69, 0.3);
    border-radius: 20px; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.28);
    padding: 26px 24px 22px; box-sizing: border-box;
    animation: tzqPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.tzq-days-close {
    position: absolute; top: 14px; left: 14px;
    width: 30px !important; height: 30px !important; padding: 0 !important; margin: 0 !important;
    border: none !important; border-radius: 50% !important; cursor: pointer;
    color: #6d4b93 !important; font-size: 18px; line-height: 1;
    background: rgba(109, 75, 147, 0.1) !important; box-shadow: none !important;
    transition: background 0.2s ease;
}
.tzq-days-close:hover { background: rgba(109, 75, 147, 0.2) !important; }

.tzq-days-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding-inline-end: 36px; }
.tzq-days-ico {
    flex: 0 0 48px; width: 48px; height: 48px; border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #9572b8, #6d4b93); color: #f0d28a; font-size: 20px;
    box-shadow: 0 8px 18px rgba(109, 75, 147, 0.28);
}
.tzq-days-title { margin: 0; font-size: 17px; font-weight: 900; color: #2d1f3f; line-height: 1.3; }
.tzq-days-price { margin-top: 3px; font-size: 12.5px; font-weight: 700; color: #9a8fab; }

.tzq-days-exists {
    display: none; margin-bottom: 14px; padding: 9px 12px; border-radius: 10px;
    background: rgba(212, 165, 69, 0.12); border: 1px solid rgba(212, 165, 69, 0.3);
    color: #8a6d1f; font-size: 12px; font-weight: 800; line-height: 1.5;
}
.tzq-days-label { display: block; margin-bottom: 10px; font-size: 13px; font-weight: 800; color: #2d1f3f; }

.tzq-days-stepper {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 8px; border: 1px solid rgba(212, 165, 69, 0.4); border-radius: 16px; background: #fff;
}
.tzq-days-minus, .tzq-days-plus {
    width: 46px !important; height: 46px !important; flex: 0 0 46px; padding: 0 !important; margin: 0 !important;
    border: none !important; border-radius: 12px !important; cursor: pointer;
    background: rgba(109, 75, 147, 0.08) !important; color: #6d4b93 !important;
    font-size: 24px; font-weight: 900; line-height: 1; box-shadow: none !important;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background 0.2s ease, transform 0.12s ease;
}
.tzq-days-minus:hover, .tzq-days-plus:hover { background: rgba(109, 75, 147, 0.18) !important; }
.tzq-days-minus:active, .tzq-days-plus:active { transform: scale(0.9); }
.tzq-days-input {
    flex: 1; width: 100%; height: 46px !important; padding: 0 !important; margin: 0 !important;
    text-align: center; border: none !important; background: transparent !important; box-shadow: none !important;
    font-family: inherit; font-weight: 900; font-size: 22px; color: #2d1f3f;
    -moz-appearance: textfield; appearance: textfield;
}
.tzq-days-input::-webkit-outer-spin-button,
.tzq-days-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tzq-days-input:focus { outline: none; }

.tzq-days-total {
    margin: 16px 0 18px; padding: 13px 16px; border-radius: 12px;
    background: rgba(212, 165, 69, 0.1); border: 1px solid rgba(212, 165, 69, 0.25);
    display: flex; justify-content: space-between; align-items: center;
    font-size: 13px; font-weight: 800; color: #2d1f3f;
}
.tzq-days-total strong { color: #6d4b93; font-size: 17px; }

.tzq-days-actions { display: flex; gap: 10px; }
.tzq-days-cancel {
    flex: 0 0 auto; width: auto !important; height: 50px !important; padding: 0 20px !important; margin: 0 !important;
    border: 1px solid rgba(109, 75, 147, 0.28) !important; border-radius: 999px !important; cursor: pointer;
    background: #fff !important; color: #6d4b93 !important; box-shadow: none !important;
    font-family: inherit; font-size: 14px; font-weight: 900; transition: background 0.2s ease;
}
.tzq-days-cancel:hover { background: rgba(109, 75, 147, 0.06) !important; }
.tzq-days-confirm {
    flex: 1; width: auto !important; height: 50px !important; padding: 0 16px !important; margin: 0 !important;
    border: none !important; border-radius: 999px !important; cursor: pointer;
    color: #fff !important; font-family: inherit; font-size: 14.5px; font-weight: 900;
    background: linear-gradient(135deg, #9572b8 0%, #7e5aa3 48%, #6d4b93 100%) !important;
    box-shadow: 0 10px 22px rgba(109, 75, 147, 0.28) !important;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tzq-days-confirm:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(109, 75, 147, 0.36) !important; }
.tzq-days-confirm i { color: #f0d28a; font-size: 14px; }

@media (max-width: 480px) {
    .tzq-sticky { left: 16px; bottom: 16px; height: 50px; font-size: 14px; }
    .tzq-toast { left: 16px; bottom: 78px; }
    .tzq-days-modal { padding: 22px 18px 18px; }
    .tzq-item { flex-wrap: wrap; }
    .tzq-item-main { flex: 1 1 100%; }
    .tzq-item-days-wrap { margin-inline-end: auto; }
    .tzq-item-end { margin-inline-start: 0; }
}
