/* تعریف فونت یگان (Yekan) */
@font-face {
    font-family: 'Dana-Y'; /* نامی که برای فونت خود انتخاب می‌کنید */
    src: url('https://danapardaz.com/wp-content/uploads/2025/06/Yekan-VF.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap; /* برای بهبود تجربه کاربری هنگام بارگذاری فونت */
}

/* General Body and Layout Styles */
body {
    font-family: 'Dana-Y', sans-serif; /* استفاده از فونت یگان به عنوان فونت اصلی */
    direction: rtl;
    background-color: #f0f2f5;
    color: #333;
    padding: 0;
    margin: 0;
}



button {
    font-family: 'Dana-Y', sans-serif;
    font-weight: 300 !important;
}

/* --- Header Styles --- */
.main-header {
    width: 100%;
    background-color: #f8f8f8; /* رنگ پس زمینه دلخواه */
    border-bottom: 1px solid #eee;
    padding: 15px 0; /* پدینگ بالا و پایین */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-content {
    max-width: 1340px; /* حداکثر عرض مورد نظر شما */
    margin: 0 auto; /* قرار گرفتن در مرکز */
    display: flex;
    justify-content: space-between; /* لوگو و دکمه را در دو انتها قرار می دهد */
    align-items: center; /* تراز عمودی */
    padding: 0 20px; /* پدینگ چپ و راست برای جلوگیری از چسبیدن به لبه ها در موبایل */
}

.logo-container .logo {
    max-height: 36px; /* ارتفاع لوگو */
    width: auto;
    display: block; /* برای حذف فضای خالی زیر تصویر */
}

.header-button {
    background-color: #0d2e4e;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 300;
    transition: background-color 0.3s ease;
    font-family: 'Dana-Y';
}

.header-button:hover {
    background-color: #fa803b; /* رنگ دکمه هنگام هاور (نارنجی داناپرداز) */
}

.datadescription {
    background-color: #fff;
    border-radius: 20px;
    padding: 40px;
    margin-top: 30px;
}

/* Media Query برای ریسپانسیو بودن موبایل هدر */
@media (max-width: 768px) {
    .header-content {
        flex-direction: row; /* می توانید به column تغییر دهید اگر بخواهید روی هم قرار بگیرند */
        justify-content: space-between; /* همچنان در موبایل هم در دو انتها باشند */
        padding: 0 15px; /* پدینگ کمتر برای موبایل */
    }

    .logo-container .logo {
        max-height: 40px; /* ارتفاع کوچکتر لوگو در موبایل */
    }

    .header-button {
        padding: 8px 15px; /* پدینگ کوچکتر دکمه در موبایل */
        font-size: 14px;
    }
}

/* --- END Header Styles --- */

/* Styles for content wrapper */
.content-wrapper {
    max-width: 1340px; /* همان عرض هدر */
    margin: 20px auto; /* فاصله از هدر و مرکز صفحه */
    padding: 20px;
    min-height: 500px; /* حداقل ارتفاع برای دیدن محتوا */
}


#mainForm{
    background-color:#fff;
    border-radius:20px;
    padding:20px;
}




/* General Body and Layout Styles */


/* Headings & Text */
.dana-title {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 1.5rem;
    color: #0d2e4e;
}

.dana-subtitle {
    text-align: center;
    color: #4b5563;
    margin-bottom: 2rem;
}

.firstselerdiv{
    margin-top: 40px;
}

.sellerLogobox {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}
th.firstth {
    border-bottom: 0px !important;
}

.dana-flex-col.invoice-price {
    background-color: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}


.dana-section-title {
    font-weight: 600;
    margin-bottom: 1rem;
    color: #0d2e4e;
    display: flex;
    align-items: center;
    font-size: 24px;
    gap: 10px;
}
.dana-section-title:before {
    content: "";
    width: 4px;
    position: unset;
    display: block;
    height: 30px;
    border-radius: .4375rem;
    background-color: #1458d0;
}
.dana-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.invoice-table-box {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}


/* Flexbox for Two-Column Layouts */
.dana-flex-two-cols {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dana-flex-col {
    flex: 1 1 44%;
    padding: 20px;
}

@media (max-width: 767px) {
    .dana-flex-col {
        flex: 1 1 100%;
    }
    
    .accordion-question {
    font-size: 14px!important;
}
}


/* Input Fields */
.dana-input-field,
.dana-textarea-field {
    border: 1px solid #9ca3af;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    text-align: right;
    margin-bottom: 1rem;
    font-family: 'Dana-Y';
}

.dana-input-field:focus,
.dana-textarea-field:focus {
    outline: none;
    border-color: #1458d0;
    box-shadow: 0 0 0 3px rgb(13 46 78 / 4%);
}

.dana-textarea-field {
    resize: vertical;
}

/* File Input Styling */
.dana-file-input-wrapper {
    width: 130px;
    height: 115px;
    padding: 0.75rem 1rem;
    border: 1px dashed #0d2e4e;
    border-radius: 8px;
    background-color: #f8f9fa;
    color: #0d2e4e;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}
.dana-file-input-wrapper::-webkit-file-upload-button {
    visibility: hidden;
    width: 0;
    padding: 0;
    margin: 0;
}

.dana-file-input-wrapper::after {
    content: "jpg - png";
    text-align: center;
    margin-top: 5px;
    color: #9fa7af;
}

.dana-file-input-wrapper::before {
    content: 'انتخاب فایل';
    display: inline-block;
    background: #0d2e4e;
    color: white;
    border-radius: 6px;
    padding: 0.5rem 0rem;
    outline: none;
    white-space: nowrap;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: background-color 0.2s;
    font-family: 'Dana-Y';
    text-align: center;
    margin-bottom: 10px;
}
.dana-file-input-wrapper:hover::before {
    background-color: #0a243d;
}
.dana-logo-preview {
    max-height: 115px;
    object-fit: contain;
    margin-bottom: 0;
    border-radius: 8px;
    display: block;
}
.dana-hidden {
    display: none !important;
}

/* Buttons */
.dana-btn-group {
    text-align: center;
    margin-top: 2rem;
}
.dana-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    border: none;
    margin: 0 0.5rem;
    min-width: 120px;
}
.dana-btn-primary {
    background-color: #fa803b;
    color: white;
}
.dana-btn-primary:hover {
    background-color: #e06a2b;
    transform: translateY(-1px);
}
.dana-btn-secondary {
    background-color: #0d2e4e;
    color: white;
}
.dana-btn-secondary:hover {
    background-color: #0a243d;
    transform: translateY(-1px);
}
.dana-btn-danger-compact {
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0.8rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}
.dana-btn-danger-compact:hover {
    background-color: #c82333;
}
.dana-add-item-btn {
    margin-bottom: 2rem;
}


/* Invoice Items Table */
.dana-invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    min-width: 700px;
}
.dana-invoice-table th, .dana-invoice-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: right;
    white-space: nowrap;
}
.dana-invoice-table th {
    background-color: #1458d0;
    font-weight: 600;
    color: #fff;
}


/* Adjusted widths for better fit without horizontal scroll */
.dana-invoice-table .item-no { width: 5%; text-align: center;border-radius: 0px 10px 10px 0px; }
.dana-invoice-table .item-description { width: 45%; }
.dana-invoice-table .item-quantity { width: 12%; }
.dana-invoice-table .item-unit-price { width: 18%; }
.dana-invoice-table .item-total { width: 15%; }
.dana-invoice-table .no-print { width: 5%; text-align: center;border-radius: 10px 0px 0px 10px; }


/* Checkbox Styles */
.dana-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.dana-checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}
.dana-checkbox-container input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin-left: 0.5rem;
}
.dana-checkbox-container input[type="checkbox"]:checked {
    background-color: #fa803b;
    border-color: #fa803b;
}
.dana-checkbox-container input[type="checkbox"]:checked::after {
    content: '✔';
    color: white;
    font-size: 14px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.dana-checkbox-container span {
    font-size: 0.95rem;
    color: #374151;
}

/* Collapsible Section */
.dana-collapsible-section {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    background-color: #f8f9fa;
}
input.item-description-input {
    margin-bottom: 0 !important;
}
input.item-quantity-input.dana-input-field {
    margin-bottom: 0 !important;
}
input.item-unit-price-input.dana-input-field {
    margin-bottom: 0px !important;
}
.dana-collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: #0d2e4e;
}
div#sellerOptionalFields {
    border-top: 1px dashed #e2e8f0;
    margin-top: 1rem;
    padding-top: 0.5rem;
    padding: 20px;
}
div#buyerOptionalFields{
    border-top: 1px dashed #e2e8f0;
    margin-top: 1rem;
    padding-top: 0.5rem;
    padding: 20px;
}

.dana-collapsible-content {
    display: none;
}
.dana-collapsible-content.expanded {
    display: block;
}

/* Summary Display */
.dana-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 1rem 0;
    border-bottom: 1px solid #e2e8f0;
}
.dana-summary-item:last-of-type {
    border-bottom: none;
}
.dana-summary-label {
    font-weight: 500;
    color: #374151;
}
.dana-summary-value {
    font-weight: 600;
    font-size: 1.125rem;
    color: #1f2937;
}
.dana-summary-value.danger {
    color: #dc2626;
}
.dana-grand-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.5rem;
    margin-top: 1rem;
    border-top: 2px solid #0d2e4e;
}
.dana-grand-total-label {
    font-weight: bold;
    font-size: 1.25rem;
    color: #0d2e4e;
}
.dana-grand-total-value {
    font-weight: bold;
    font-size: 1.5rem;
    color: #0d2e4e;
}

/* Informational Content */
.dana-info-box {
    margin-top: 3rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background-color: #f9fafb;
}
.dana-info-text {
    text-align: justify;
    color: #374151;
    margin-bottom: 1rem;
}
.dana-info-list {
    list-style-type: disc;
    list-style-position: inside;
    color: #374151;
    margin-bottom: 1rem;
    padding-right: 1rem;
}
.dana-info-list li {
    margin-bottom: 0.5rem;
    text-align: right;
}

/* Promotion Section */
.dana-promo-banner {
    background-color: #e6f0f7;
    border: 1px solid #cce0ee;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
@media (min-width: 768px) {
    .dana-promo-banner {
        flex-direction: row;
    }
}
.dana-promo-content {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    text-align: center;
}
@media (min-width: 768px) {
    .dana-promo-content {
        margin-bottom: 0;
        text-align: right;
    }
}
.dana-promo-logo {
    height: 2.5rem;
    margin-left: 1rem;
}
.dana-promo-text {
    font-weight: 500;
    color: #0d2e4e;
}
.dana-promo-text span {
    display: block;
    font-size: 1.125rem;
}
.dana-promo-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
@media (min-width: 640px) {
    .dana-promo-actions {
        flex-direction: row;
    }
    
}
    .accordion-container {
        background-color: #fff;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        overflow: hidden;
        margin: 20px auto; /* برای مرکز قرار گرفتن و فاصله از بالا و پایین */
    }

    .accordion-item {
        border-bottom: 1px solid #eee;
    }

    .accordion-item:last-child {
        border-bottom: none;
    }

    .accordion-question {
        padding: 18px 25px;
        font-size: 1.1em;
        font-weight: bold;
        color: #333;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background-color: #f9f9f9;
        transition: background-color 0.3s ease;
    }

    .accordion-question:hover {
        background-color: #f0f0f0;
    }

    .accordion-question::after {
        content: '+';
        font-size: 1.5em;
        transition: transform 0.3s ease;
    }

    .accordion-question.active::after {
        content: '-';
        transform: rotate(0deg);
    }

    .accordion-answer {
        padding: 0 25px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out, padding 0.3s ease-out;
        background-color: #fff;
        color: #666;
        font-size: 1em;
        line-height: 1.6;
    }

    .accordion-answer.show {
        max-height: 200px; /* این مقدار رو اگه پاسخ‌هاتون طولانی‌تره، بیشتر کنید */
        padding: 15px 25px 25px;
    }