/* ==========================================================================
   Daskhosh Widget CSS — نسخه 3.0 (کامل، ریسپانسیو و شامل باتم‌شیت موبایل)
   ========================================================================== */

.daskhosh-box {
    margin: 14px 0;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    font-family: inherit;
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.daskhosh-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.daskhosh-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.daskhosh-help-btn {
    font-size: 11px;
    font-weight: 600;
    background: #eff6ff;
    color: #0258fe;
    border: 1px solid #bfdbfe;
    padding: 3px 10px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
    user-select: none;
}

.daskhosh-help-btn:hover {
    background: #0258fe;
    color: #ffffff;
    border-color: #0258fe;
}

/* Comparison Bar */
.daskhosh-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 12px;
    font-size: 11.5px;
}

.daskhosh-comp-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.daskhosh-comp-label {
    color: #64748b;
    font-size: 10.5px;
}

.daskhosh-comp-val {
    font-weight: 700;
    font-size: 12.5px;
}

.daskhosh-market-price {
    color: #94a3b8;
    text-decoration: line-through;
}

.daskhosh-user-savings {
    color: #16a34a;
}

/* Preset Chips */
.daskhosh-chips {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}

.daskhosh-chip {
    padding: 8px 4px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    box-sizing: border-box;
}

.daskhosh-chip-pct {
    font-size: 12px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.1;
}

.daskhosh-chip-sub {
    font-size: 9.5px;
    color: #64748b;
    line-height: 1.1;
}

.daskhosh-chip:hover {
    border-color: #0258fe;
    background: #eff6ff;
}

.daskhosh-chip:hover .daskhosh-chip-pct {
    color: #0258fe;
}

.daskhosh-chip.active {
    background: #0258fe;
    border-color: #0258fe;
    box-shadow: 0 2px 8px rgba(2, 88, 254, 0.25);
}

.daskhosh-chip.active .daskhosh-chip-pct,
.daskhosh-chip.active .daskhosh-chip-sub {
    color: #ffffff;
}

/* Slider Controls */
.daskhosh-slider-wrapper {
    margin: 10px 0;
}

.daskhosh-slider {
    width: 100%;
    height: 6px;
    border-radius: 4px;
    background: #cbd5e1;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.daskhosh-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0258fe;
    cursor: pointer;
    box-shadow: 0 0 0 3px #dbeafe, 0 1px 4px rgba(0, 0, 0, 0.15);
    transition: transform 0.1s ease;
}

.daskhosh-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.daskhosh-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0258fe;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 0 3px #dbeafe;
}

/* Input Group */
.daskhosh-input-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 6px 12px;
    margin-top: 8px;
    transition: border-color 0.15s ease;
}

.daskhosh-input-group:focus-within {
    border-color: #0258fe;
    box-shadow: 0 0 0 2px rgba(2, 88, 254, 0.15);
}

.daskhosh-unit-label {
    font-size: 11.5px;
    color: #64748b;
    font-weight: 600;
}

.daskhosh-input-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}

.daskhosh-input {
    border: none;
    outline: none;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    background: transparent;
    direction: ltr;
    text-align: left;
    width: 120px;
    font-family: inherit;
}

.daskhosh-unit-toman {
    font-size: 11.5px;
    color: #64748b;
}

/* Empathy Note */
.daskhosh-empathy {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 6px 10px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
}

/* Summary Row */
.daskhosh-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #cbd5e1;
    font-size: 12.5px;
    font-weight: 700;
}

.daskhosh-final-price {
    font-size: 15px;
    font-weight: 800;
    color: #0258fe;
}

/* Modal Dialog */
.daskhosh-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 100000001 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    direction: rtl;
}

.daskhosh-modal-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.daskhosh-modal-content {
    background: #ffffff;
    border-radius: 20px;
    max-width: 440px;
    width: 100%;
    padding: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f1f5f9;
}

.daskhosh-modal-backdrop.open .daskhosh-modal-content {
    transform: scale(1);
}

.daskhosh-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.daskhosh-modal-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #eff6ff;
    color: #0258fe;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.daskhosh-modal-title {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

.daskhosh-modal-body {
    font-size: 13px;
    color: #334155;
    line-height: 1.8;
    margin-bottom: 20px;
}

.daskhosh-modal-step {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.daskhosh-modal-step-badge {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #0258fe;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
    margin-top: 2px;
}

.daskhosh-modal-btn {
    width: 100%;
    background: #0258fe;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
    box-shadow: 0 4px 12px rgba(2, 88, 254, 0.25);
    text-align: center;
}

.daskhosh-modal-btn:hover {
    background: #0046d4;
}

/* ==========================================================================
   Mobile Bottom Sheet (مودال کشویی اختصاصی موبایل)
   ========================================================================== */
.daskhosh-mobile-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 99999999 !important;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    direction: rtl;
}

.daskhosh-mobile-sheet-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.daskhosh-mobile-sheet {
    background: #ffffff;
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 18px 16px 24px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.25);
    transform: translateY(100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    z-index: 100000000 !important;
}

.daskhosh-mobile-sheet-backdrop.open .daskhosh-mobile-sheet {
    transform: translateY(0);
}

.daskhosh-sheet-handle {
    width: 40px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 2px;
    margin: 0 auto 14px;
}

.daskhosh-sheet-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
}

.daskhosh-sheet-submit-btn {
    width: 100%;
    background: #0258fe;
    color: #ffffff;
    border: none;
    border-radius: 14px;
    padding: 13px 16px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(2, 88, 254, 0.3);
    transition: background 0.15s ease;
}

.daskhosh-sheet-submit-btn:hover {
    background: #0046d4;
}

.daskhosh-sheet-skip-btn {
    width: 100%;
    background: transparent;
    color: #64748b;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
}

.daskhosh-sheet-skip-btn:hover {
    color: #334155;
    border-color: #94a3b8;
    background: #f8fafc;
}
