@font-face {
    font-family: 'IRANSans';
    src: url('./assets/fonts/iransans/IRANSansWeb_UltraLight.eot');
    src: url('./assets/fonts/iransans/IRANSansWeb_UltraLight.eot?#iefix') format('embedded-opentype'),
        url('./assets/fonts/iransans/IRANSansWeb_UltraLight.woff2') format('woff2'),
        url('./assets/fonts/iransans/IRANSansWeb_UltraLight.woff') format('woff'),
        url('./assets/fonts/iransans/IRANSansWeb_UltraLight.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
}

body, * {
    font-family: 'IRANSans', Tahoma !important;
}

body {
    background-color: #f8f9fa;
    font-size: 14px;
    line-height: 1.6;
}

.invoice-card {
    background-color: #fff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    max-width: 1000px;
    margin: 0 auto;
    border: 1px solid #e9ecef;
}
.lpt {
    font-size: 12px;
    color: black !important;
}

.info-section {
    margin: 20px 0 40px;
    padding: 15px 0;
    border-bottom: 2px solid #f8f9fa;
}

.info-section input.form-control {
    width: 200px !important;
    margin: 0 5px;
}

.info-section span {
    font-size: 14px;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 15px;
}

.form-control, .form-select {
    font-size: 14px;
    padding: 8px 12px;
}

.form-check {
    padding-right: 1.5em;
    padding-left: 0;
}

.form-check .form-check-input {
    float: right;
    margin-right: -1.5em;
    margin-left: 0;
}

.small-text {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.costs-section {
    margin-top: 40px;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
}

.costs-section h5 {
    font-size: 16px;
    margin-bottom: 20px;
    font-weight: bold;
    color: #2c3e50;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.table {
    margin-bottom: 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.table td {
    padding: 12px 15px;
    vertical-align: middle;
    font-size: 14px;
    border-bottom: 1px solid #e9ecef;
}

.table td:last-child {
    width: 200px;
    text-align: center;
    font-weight: 500;
}

.total-section {
    background-color: #2c3e50;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-top: 20px;
    color: white;
}

.total-section h5 {
    margin: 0;
    color: white;
    font-size: 18px;
    font-weight: bold;
}

.signature-section {
    text-align: left;
    margin-top: 3rem;
    padding-top: 20px;
    border-top: 2px solid #f8f9fa;
}

.signature-text {
    flex: 1;
    padding-right: 20px;
}

.signature-text p {
    font-size: 13px;
    color: #6c757d;
    position: relative;
    padding-right: 15px;
}

.signature-img {
    max-width: 200px;
    height: auto;
    margin-right: 20px;
    border: 1px solid #e9ecef;
    padding: 10px;
    border-radius: 5px;
}

.btn-primary {
    padding: 12px 35px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    background-color: #2c3e50;
    border-color: #2c3e50;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #1a252f;
    border-color: #1a252f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

@media print {
    body {
        margin: 0;
        padding: 0;
        background: white;
    }
    
    .invoice-card {
        box-shadow: none;
        margin: 0;
        padding: 20px;
        min-height: 29.7cm;
        width: 21cm;
        position: relative;
        direction: rtl !important;
        text-align: right !important;
    }

    /* مخفی کردن بخش‌های آبی و زرد در هنگام چاپ */
    .alert-info,
    .alert-warning {
        display: none !important;
    }

    /* مخفی کردن dropdown ها در هنگام چاپ */
    #supportPlanSelect,
    #supportDurationSelect {
        display: none !important;
    }

    /* نمایش متن انتخاب شده به جای dropdown */
    .support-plan-selection-text {
        display: block !important;
        font-weight: bold;
        margin-bottom: 10px;
        color: #000;
    }

    #customerName, 
    input#customerName,
    .form-control#customerName {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        pointer-events: none !important;
        width: 0 !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        clip: rect(0 0 0 0) !important;
        overflow: hidden !important;
    }

    .customer-name-print {
        display: inline !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: static !important;
        font-size: 14px !important;
        font-weight: normal !important;
        margin-right: 5px !important;
    }

    .form-check,
    #generate-pdf {
        display: none !important;
    }

    .signature-section {
        margin-top: 2cm;
        page-break-inside: avoid;
    }

    .signature-text {
        margin-bottom: 1cm;
    }

    .signature-text p {
        margin-bottom: 0.5cm;
        direction: rtl !important;
        text-align: right !important;
    }

    .costs-section {
        page-break-inside: avoid;
    }

    input.form-control,
    .form-select {
        direction: rtl;
        text-align: right;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        border: none;
        background: none;
        padding-right: 0;
    }

    .form-select {
        color: #000;
    }

    .form-select::-ms-expand {
        display: none;
    }

    .form-select option {
        direction: rtl;
        text-align: right;
    }

    #customerName {
        border: none;
        background: transparent;
        padding: 0;
        margin: 0;
        width: auto;
        direction: rtl;
        text-align: right;
    }

    .small-text,
    .costs-section td,
    .costs-section p,
    #features-line1,
    #features-line2,
    .table td,
    .alert,
    .alert-light,
    .alert-primary {
        direction: rtl !important;
        text-align: right !important;
    }

    .table td:last-child {
        text-align: center !important;
    }

    .costs-section .alert span {
        margin-right: 5px !important;
    }

    #supportRow td,
    .costs-section tr td {
        direction: rtl !important;
        text-align: right !important;
    }

    #supportRow td:last-child,
    .costs-section tr td:last-child {
        text-align: center !important;
    }

    /* راست‌چین کردن همه المان‌های متنی */
    .invoice-card,
    .invoice-card *,
    p,
    td,
    th,
    span,
    div,
    .form-control,
    .form-select,
    .alert,
    .small-text,
    #features-line1,
    #features-line2,
    .costs-section td,
    .costs-section p,
    .table td,
    .alert-light,
    .alert-primary,
    .signature-text p,
    .invoice-header,
    .invoice-header p,
    .info-section,
    .info-section span {
        direction: rtl !important;
        text-align: right !important;
    }

    /* تنظیم خاص برای جدول‌ها */
    .table {
        direction: rtl !important;
    }

    .table td,
    .costs-section tr td {
        text-align: right !important;
        padding-right: 15px !important;
    }

    /* مرکزچین کردن ستون قیمت‌ها */
    .table td:last-child,
    .costs-section tr td:last-child,
    td:has(span:contains("تومان")) {
        text-align: center !important;
    }

    /* تنظیمات برای alert boxes */
    .alert {
        padding: 15px 20px !important;
        text-align: right !important;
    }

    .alert span {
        margin-right: 5px !important;
    }

    /* تنظیمات برای متن‌های توضیحات */
    #features-line1,
    #features-line2,
    .small-text {
        padding-right: 0 !important;
        margin-right: 0 !important;
    }

    /* تنظیمات برای بخش امضا */
    .signature-section {
        text-align: right !important;
    }

    .signature-text {
        padding-right: 0 !important;
        text-align: right !important;
    }

    /* تنظیمات برای هدر */
    .invoice-header {
        text-align: center !important;
    }
}

/* استایل عمومی برای متن‌های پایین صفحه */
.signature-text p {
    font-size: 12px;
    line-height: 1.5;
    color: #666;
    margin-bottom: 8px;
}

.form-group label {
    padding-bottom: 5px;
}

.invoice-header {
    text-align: center;
    margin-bottom: 40px;
}

.invoice-header h1 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #2c3e50;
}

.invoice-header p {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
}
.info-section.d-flex.justify-content-between.align-items-center {
  margin-top: -80px;
}
.signature-text p {
    direction: rtl;
    text-align: right;
    line-height: 2.5rem !important;
    font-size: 14px;
    font-weight: bold;
}

/* استایل‌های عمومی برای فیلد نام کارفرما */
#customerName {
    direction: rtl;
    text-align: right;
    padding-right: 12px;
}

.customer-name-print {
    display: none;
    font-size: 14px;
    font-weight: normal;
    margin-right: 5px;
}

/* استایل برای علامت X روی پلن‌های غیرانتخابی */
.plan-cross {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 120px;
    color: #dc3545;
    font-weight: bold;
    z-index: 10;
    pointer-events: none;
    transform: rotate(-45deg);
    border-radius: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.plan-cross:hover {
    background: rgba(255, 0, 0, 0.2);
}

/* استایل برای کارت‌های پلن */
.support-plan-card .card {
    position: relative;
    transition: all 0.3s ease;
}

.support-plan-card .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* استایل‌های عمومی برای select‌ها */
.form-select {
    direction: rtl;
    text-align: right;
    padding-right: 12px;
    padding-left: 36px;
    background-position: left 0.75rem center;
}

.form-select option {
    direction: rtl;
    text-align: right;
}

@media print {
    .form-select {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background: none;
        border: none;
        direction: rtl;
        text-align: right;
        padding-right: 0;
        padding-left: 0;
    }

    /* استایل برای متن‌های جایگزین select در PDF */
    .pdf-select-text {
        direction: rtl;
        text-align: right;
        display: inline-block;
        width: 100%;
        font-family: 'Vazirmatn', sans-serif;
        color: #000;
    }
}

.alert-light strong, .alert-primary strong {
    font-size: 1.1em;
}

.alert-light span, .alert-primary span {
    font-weight: bold;
    font-size: 1.2em;
    color: #0d6efd;
}

.alert-primary span {
    color: white;
    font-size: 1.3em;
}

/* استایل‌های بخش هزینه‌ها */
.costs-section .alert {
    font-size: 0.9em;
    margin-bottom: 10px;
    padding:14px 18px;
}

.costs-section .alert-light strong {
    font-size: 1.1em;
    color: #333;
}

.costs-section .alert-light span {
    font-weight: bold;
    font-size: 1em;
    color: #0d6efd;
}

.costs-section .alert-primary {
    font-size: 1.1em;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.costs-section .alert-primary strong {
    font-size: 1.1em;
    color: #fff;
}

.costs-section .alert-primary span {
    font-weight: bold;
    font-size: 1.1em;
    color: #fff;
}

@media print {
    #customerName, input#customerName {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        pointer-events: none !important;
    }

    .customer-name-print {
        display: inline !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: static !important;
    }
}

@media screen {
    .customer-name-print.show-in-pdf {
        display: inline;
    }
    
    #customerName.hide-in-pdf {
        display: none;
    }
}
.remove-custom-option {
    width: 16px;
    margin-right: -4px;
    margin-top: -1px;
    cursor: pointer;
}