* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: #f5f5f5;
    line-height: 1.6;
    font-size: 14px;
    -webkit-text-size-adjust: 100%;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Persian numbers applied only when page lang is fa */
html[lang="fa"] body {
    font-variant-numeric: persian;
    font-feature-settings: "numr";
    -webkit-font-feature-settings: "numr";
    -moz-font-feature-settings: "numr";
}

/* Language Selector */
.language-selector {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    /* keep language buttons left-to-right regardless of page direction */
    direction: ltr;
}

.lang-btn {
    background: none;
    border: 2px solid transparent;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    transform: scale(1.1);
}

.lang-btn.active {
    border-color: #3498db;
    background: rgba(52, 152, 219, 0.1);
}

.lang-btn img {
    border-radius: 2px;
}

/* English direction styles */
html[lang="en"] {
    direction: ltr;
    text-align: left;
}

/* When page language is English, use a nicer UI font for Latin scripts */
html[lang="en"] body,
html[lang="en"] .container,
html[lang="en"] .document-item,
html[lang="en"] .document-name,
html[lang="en"] .section-header h2,
html[lang="en"] .language-select,
html[lang="en"] .show-order-btn,
html[lang="en"] .mobile-order-button {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html[lang="en"] .container {
    direction: ltr;
}

html[lang="en"] .document-item-content,
html[lang="en"] .order-item {
    direction: ltr;
}

html[lang="en"] #customerPhone {
    direction: ltr;
    text-align: left;
}

/* Adjust mobile order button for English */
@media (max-width: 768px) {
    html[lang="en"] .mobile-order-button {
        right: 50%;
        left: auto;
        transform: translateX(50%);
    }
    
    html[lang="en"] .mobile-order-alert {
        text-align: left;
    }
}

/* نوار اطلاع‌رسانی موبایل */
.mobile-order-alert {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #3498db;
    color: white;
    padding: 12px 15px;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    align-items: center;
    justify-content: space-between;
}

.mobile-order-alert.show {
    display: flex;
}

.show-order-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 12px;
}

.show-order-btn:active {
    background: rgba(255,255,255,0.3);
}

/* دکمه رفتن به بخش سفارش در موبایل */
.mobile-order-button {
    display: none;
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: #3498db;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 24px;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    z-index: 999;
    transition: all 0.3s ease;
}

.mobile-order-button:hover {
    background: #2980b9;
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
}

.container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 25px;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.search-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.section-header h2 {
    margin: 0;
    color: #2c3e50;
    font-weight: 700;
    font-size: 1.1rem;
    white-space: nowrap;
}

.language-select {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 13px;
    min-width: 140px;
    background: white;
}

.language-select option {
    font-family: 'Vazirmatn', sans-serif;
}

#documentSearch {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    font-family: 'Vazirmatn', sans-serif;
    transition: border-color 0.3s ease;
}

#documentSearch:focus {
    outline: none;
    border-color: #3498db;
}

/* دسته‌بندی‌ها */
.categories {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 20px;
    padding: 10px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.category-tab {
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    -webkit-appearance: none;
    appearance: none;
    flex: 0 0 auto;
}

.category-tab:hover {
    background: #e9ecef;
}

.category-tab.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.category-tab:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52,152,219,0.12);
}

.document-list {
    max-height: 450px;
    overflow-y: auto;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    padding: 5px;
}

.document-list::-webkit-scrollbar {
    width: 8px;
}

.document-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.document-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.document-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.document-item {
    padding: 6px 8px;
    border: 1px solid #f8f9fa;
    margin-bottom: 2px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 400;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 12px;
    min-height: auto;
}

.document-item:hover {
    background-color: #f8f9fa;
    border-color: #3498db;
    transform: translateX(-3px);
}

.document-item:active {
    background-color: #e3f2fd;
}

.document-item.selected {
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.document-plus-btn {
    background: #27ae60;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    border: none;
    flex-shrink: 0;
    opacity: 0.2;
    pointer-events: none;
}

.document-item.selected .document-plus-btn {
    opacity: 1;
    pointer-events: auto;
}

.document-minus-btn {
    background: #e74c3c;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    border: none;
    flex-shrink: 0;
    opacity: 1;
}

.document-item.has-quantity .document-minus-btn {
    display: flex;
}

.document-item-content {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px;
}

/* Allow flex children to shrink instead of forcing parent to grow */
.document-item, .document-item-content, .document-name, .document-controls, .item-info, .item-main-info, .item-name {
    min-width: 0;
}

/* Truncate long document names to avoid expanding viewport on mobile */
.document-name, .item-name {
    /* Allow wrapping instead of truncation so long names flow to next line */
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    word-break: break-word;
}

.document-name {
    flex: 1;
    font-size: 12px;
    cursor: pointer;
    text-align: right;
    order: 2;
}

.document-quantity {
    background: #27ae60;
    color: white;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 12px;
    line-height: 1;
    text-align: center;
    order: 1;
    margin: 0;
}

.document-controls {
    display: flex;
    align-items: center;
    gap: 3px;
    order: 3;
    margin: 0;
}

/* Prevent quantity badge or controls from growing the container */
.document-quantity, .document-controls {
    flex: 0 0 auto;
}

.order-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    height: fit-content;
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    height: 75vh;
}

.order-section h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.order-items-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 180px;
    margin-bottom: 15px;
}

.order-items {
    flex: 1;
    overflow-y: auto;
    max-height: 350px;
    min-height: 200px;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    padding: 5px;
}

.order-items::-webkit-scrollbar {
    width: 6px;
}

.order-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.order-items::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.order-items::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 8px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 6px;
    border-radius: 5px;
    background-color: #fafafa;
    gap: 8px;
    font-size: 13px;
    flex-direction: column;
}

.item-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    white-space: nowrap;
}

.item-number {
    margin-left: 6px;
    margin-right: 6px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 2px;
}

.order-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-name {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 1px; 
    line-height: 1.4;
}

/* Price Section Styles */
.price-section {
    margin-top: 4px;
    width: 100%;
}

.price-main {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    flex-wrap: nowrap;
}

.price-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    margin-left: 8px;
}

.price-amount {
    font-size: 13px;
    font-weight: 700;
    color: #27ae60;
    font-variant-numeric: persian;
    margin-left: 4px;
}

.price-details-toggle {
    margin-top: 4px;
}

.details-btn {
    background: none;
    border: none;
    color: #3498db;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
    font-family: 'Vazirmatn', sans-serif;
    margin-right: auto;
    pointer-events: auto;
}

.details-btn:hover {
    background-color: #f8f9fa;
    text-decoration: underline;
}

.price-breakdown {
    margin-top: 8px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease-in-out;
    max-height: 200px;
    overflow: hidden;
    pointer-events: auto;
}

.price-breakdown * {
    pointer-events: auto;
}

.price-breakdown[style*="display: none"] {
    max-height: 0;
    padding: 0;
    margin: 0;
    border: none;
    opacity: 0;
}

.price-breakdown:not([style*="display: none"]) {
    max-height: 200px;
    opacity: 1;
}


.breakdown-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 12px;
    color: #666;
    gap: 15px; /* فاصله بین متن و عدد */
}

.breakdown-line:last-child {
    margin-bottom: 0;
}

.breakdown-line span:first-child {
    font-weight: 500;
    flex: 1;
    text-align: right;
}

.breakdown-line span:last-child {
    font-variant-numeric: persian;
    font-family: 'Vazirmatn', sans-serif;
    flex-shrink: 0;
    min-width: 100px; /* حداقل عرض برای اعداد */
    text-align: left;
}

.item-main-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex: 1;
    gap: 12px;
    margin-top: 4px;
}

.verification-type {
    width: auto;
    min-width: 180px;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 12px;
    flex-shrink: 0;
}

.verification-type option {
    font-family: 'Vazirmatn', sans-serif;
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 12px;
    flex-shrink: 0;
}

.quantity-btn {
    width: 22px;
    height: 22px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 10px;
}

.quantity-btn:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.quantity {
    font-weight: 700;
    min-width: 22px;
    text-align: center;
    font-size: 12px;
    color: #2c3e50;
    font-variant-numeric: persian;
    margin: 0 3px;
}

.remove-btn {
    color: #e74c3c;
    cursor: pointer;
    padding: 3px;
    font-size: 1rem;
    transition: color 0.3s ease;
    background: none;
    border: none;
    font-family: 'Vazirmatn', sans-serif;
    margin-right: 4px;
}

.remove-btn:hover {
    color: #c0392b;
}

.empty-message {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    padding: 40px 0;
    font-size: 13px;
}

.additional-info {
    margin: 12px 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    flex-shrink: 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
    gap: 8px;
    font-size: 13px;
}

.checkbox-label input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #3498db;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.checkbox-label input:checked + .checkmark {
    background: #3498db;
}

.checkbox-label input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
}

.additional-fields {
    display: none;
    margin-top: 12px;
    gap: 12px;
}

.additional-fields.show {
    display: flex;
    flex-direction: column;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.field-group label {
    font-weight: 500;
    color: #2c3e50;
    font-size: 12px;
}

.field-group input,
.field-group textarea {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 13px;
}

.field-group textarea {
    resize: vertical;
    min-height: 50px;
}

.order-total {
    border-top: 2px solid #ecf0f1;
    padding-top: 15px;
    flex-shrink: 0;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
}

.total-row span:last-child {
    font-variant-numeric: persian;
}

.send-btn {
    width: 100%;
    padding: 14px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
}

.send-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.send-btn:not(:disabled):hover {
    background: #128C7E;
    transform: translateY(-1px);
}

.categories::-webkit-scrollbar {
    height: 4px;
}

.categories::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.categories::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.categories::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Media Query برای موبایل */
@media (max-width: 768px) {
    .mobile-order-alert.show {
        display: flex;
    }
    
    .mobile-order-button {
        display: block;
    }
    
    .container {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
        padding-bottom: 120px;
    }
    
    .order-section {
        position: static;
        height: auto;
        margin-top: 20px;
        border: 2px solid #3498db;
        animation: pulse 2s infinite;
    }
    
    @keyframes pulse {
        0% { border-color: #3498db; }
        50% { border-color: #2980b9; }
        100% { border-color: #3498db; }
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .language-select {
        min-width: 100%;
    }
    
    .additional-fields {
        flex-direction: column;
    }
    
    .order-items {
        max-height: 70vh;
        min-height: 120px;
    }
    
    .order-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 10px;
    }
    
    .item-main-info {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 10px;
    }

    .item-info {
        min-width: 0;
        flex: 1 1 auto;
    }

    /* Make verification select flexible on small screens (override desktop min-width) */
    .verification-type {
        min-width: 0;
        width: 100%;
        margin-top: 6px;
        order: 1;
    }

    .item-controls {
        width: auto;
        margin-left: 0;
        margin-top: 6px;
        order: 2;
        justify-content: flex-end;
        flex: 1;
    }
    
    .document-list {
        max-height: 60vh;
    }
    
    .categories {
        gap: 8px;
        margin-bottom: 15px;
        padding: 8px 0;
        flex-wrap: wrap;
        align-content: flex-start;
    }
    
    .category-tab {
        padding: 8px 10px;
        font-size: 12px;
        margin: 2px 4px;
    }
    
    .document-item-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        direction: rtl;
        gap: 10px;
    }

    .document-quantity {
        background: #27ae60;
        color: #ffffff;
        width: 26px;
        height: 26px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        font-weight: 700;
        font-size: 13px;
        line-height: 1;
        min-width: 26px;
        text-align: center;
        padding: 0;
        margin-left: 8px;
        margin-right: 8px;
    }

    /* slightly larger badge for LTR languages to improve legibility */
    html[lang="en"] .document-quantity {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 14px;
    }

    .mobile-order-alert {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 10000 !important;
    }

    .mobile-order-button {
        position: fixed !important;
        bottom: 70px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 10000 !important;
    }

    /* Allow the mobile order button text to wrap to the next line when needed
       (prevents the icon-only appearance while avoiding per-letter breaks) */
    .mobile-order-button {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        gap: 8px;
        flex-wrap: wrap;
        white-space: normal;
        word-break: keep-all;
        max-width: calc(100% - 40px);
        padding: 10px 14px !important;
        text-align: center;
        min-width: 110px;
    }

    .mobile-order-button > * {
        display: inline-block;
    }

    /* Price section adjustments for mobile */
    .price-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .price-breakdown {
        font-size: 10px;
    }

    .breakdown-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .item-number {
        margin: 0;
        align-self: flex-start;
    }
}

@media (min-width: 769px) {
    .mobile-order-alert {
        display: none !important;
    }
    
    .mobile-order-button {
        display: none !important;
    }
}

.tips-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.tips-modal.show {
    display: flex;
}

.tips-content {
    background: white;
    border-radius: 10px;
    padding: 25px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.tips-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.tips-header h3 {
    color: #2c3e50;
    margin: 0;
    font-size: 1.3rem;
}

.close-tips {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #7f8c8d;
    padding: 5px;
}

.close-tips:hover {
    color: #e74c3c;
}

.tips-list {
    list-style-type: decimal;
    padding-right: 20px;
    margin-bottom: 20px;
}

.tip-item {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #2c3e50;
}

.tips-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.tips-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.verification-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 10px;
    margin: 10px 0;
    color: #856404;
    font-size: 13px;
    display: none;
}

.verification-warning.show {
    display: block;
}

#customerPhone {
    direction: ltr;
    text-align: left;
    font-family: monospace;
}

.order-warning {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
    margin-top: 10px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    color: #856404;
    font-size: 11px;
    line-height: 1.4;
}

.warning-icon {
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 1px;
}

.warning-text {
    flex: 1;
}

/* برای حالت انگلیسی */
html[lang="en"] .order-warning {
    direction: ltr;
    text-align: left;
}

@media (max-width: 768px) {
    #customerPhone {
        font-size: 16px;
    }
}

html[lang="en"] .document-name,
html[lang="en"] .item-name {
    direction: ltr;
    text-align: left;
    unicode-bidi: plaintext;
}

/* English styles for price sections */
html[lang="en"] .price-amount,
html[lang="en"] .breakdown-line span:last-child,
html[lang="en"] .total-row span:last-child,
html[lang="en"] .quantity {
    font-variant-numeric: normal !important;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

html[lang="en"] .price-section,
html[lang="en"] .price-breakdown {
    direction: ltr;
    text-align: left;
}

html[lang="en"] .breakdown-line span:first-child {
    text-align: left;
    flex: 1;
}

html[lang="en"] .breakdown-line span:last-child {
    font-variant-numeric: normal;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    text-align: right;
    min-width: 100px;
}

html[lang="en"] .breakdown-line {
    direction: ltr;
    text-align: left;
    flex-direction: row;
    justify-content: space-between;
}

/* برای حالت انگلیسی */
html[lang="en"] .price-main {
    direction: ltr;
    justify-content: flex-start;
}

html[lang="en"] .price-label {
    margin-left: 0;
    margin-right: 8px;
}

html[lang="en"] .price-amount {
    margin-left: 0;
    margin-right: 4px;
    font-variant-numeric: normal;
}

html[lang="en"] .details-btn {
    margin-right: 0;
    margin-left: auto;
}

/* استایل‌های جدید برای حالت انگلیسی */
html[lang="en"] .verification-type {
    font-size: 11px; /* فونت ریزتر */
    padding: 4px 6px; /* padding کمتر */
    min-width: 160px; /* عرض کمتر */
}

html[lang="en"] .item-controls {
    gap: 1px; /* فاصله خیلی کمتر بین المان‌ها */
    margin-left: 8px; /* فاصله کمتر از سمت چپ */
}

html[lang="en"] .quantity-btn {
    width: 20px; /* دکمه‌های کوچک‌تر */
    height: 20px;
    font-size: 9px; /* فونت ریزتر برای علامت‌ها */
}

html[lang="en"] .quantity {
    min-width: 18px; /* عرض کمتر برای عدد */
    font-size: 11px; /* فونت ریزتر برای عدد */
    margin: 0 2px; /* فاصله کمتر از دو طرف */
}

html[lang="en"] .remove-btn {
    padding: 2px; /* padding کمتر */
    font-size: 0.9rem; /* آیکون کمی کوچک‌تر */
    margin-right: 2px; /* فاصله کمتر */
}

/* برای موبایل در حالت انگلیسی */
@media (max-width: 768px) {
    html[lang="en"] .item-main-info {
        gap: 6px; /* فاصله کلی کمتر */
    }
    
    html[lang="en"] .verification-type {
        width: 100%;
        font-size: 10px;
        padding: 3px 4px;
    }
    
    html[lang="en"] .item-controls {
        gap: 0.5px;
        margin-left: 4px;
    }
}

@media (max-width: 768px) {
    .order-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 8px;
    }
    
    .item-header {
        flex-direction: row; /* تغییر از column به row */
        align-items: flex-start;
        gap: 8px;
        width: 100%;
        flex-wrap: nowrap; /* جلوگیری از شکست خط */
    }
    
    .item-number {
        margin: 0;
        flex-shrink: 0;
        margin-top: 2px;
    }
    
    .item-info {
        flex: 1;
        min-width: 0;
    }
    
    .item-name {
        margin-bottom: 6px;
        white-space: normal;
        word-break: break-word;
    }
    
    .price-main {
        flex-direction: row; /* تغییر از column به row */
        align-items: center;
        gap: 6px;
        flex-wrap: nowrap; /* جلوگیری از شکست خط */
        margin-bottom: 0;
    }
    
    .price-label {
        margin-left: 0;
        white-space: nowrap; /* جلوگیری از شکست خط */
        flex-shrink: 0;
    }
    
    .price-amount {
        margin-left: 0;
        white-space: nowrap; /* جلوگیری از شکست خط */
        flex-shrink: 0;
    }
    
    .details-btn {
        margin-right: 0;
        white-space: nowrap; /* جلوگیری از شکست خط */
        flex-shrink: 0;
    }
    
    .item-main-info {
        width: 100%;
        flex-wrap: nowrap; /* جلوگیری از شکست خط */
        gap: 8px;
        margin-top: 8px;
        align-items: center;
    }
    
    .verification-type {
        min-width: 0;
        width: auto;
        flex: 1;
        margin-top: 0;
        order: 1;
        white-space: nowrap;
    }
    
    .item-controls {
        width: auto;
        margin-left: 0;
        margin-top: 0;
        order: 2;
        justify-content: flex-end;
        flex-shrink: 0;
        gap: 1px;
    }
    
    .price-breakdown {
        margin-top: 8px;
        width: 100%;
    }
    
    .breakdown-line {
        flex-direction: row; /* تغییر از column به row */
        justify-content: space-between;
        align-items: center;
        margin-bottom: 4px;
        font-size: 11px;
        gap: 8px;
        flex-wrap: nowrap;
    }
    
    .breakdown-line span:first-child {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .breakdown-line span:last-child {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    /* برای حالت انگلیسی در موبایل */
    html[lang="en"] .item-header {
        flex-direction: row;
    }
    
    html[lang="en"] .price-main {
        flex-direction: row;
    }
    
    html[lang="en"] .breakdown-line {
        flex-direction: row;
    }
    
    html[lang="en"] .item-main-info {
        flex-direction: row;
        flex-wrap: nowrap;
    }
}