@font-face {
    font-family: 'Vazir';
    font-weight: normal;
    font-style: normal;
}

html {
    height: auto;
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #f5f9fc 0%, #e6f0f5 100%);
    font-family: 'Vazir', sans-serif !important;
}

.container-box {
    max-width: 900px;
    margin: 30px auto;
    padding: 30px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    flex: 0 1 auto;
    border: 1px solid #e0e7ff;
}

.container-box::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, #1a2b4c 0%, #5fb670 100%);
}

.pharmacy-icon {
    font-size: 2.5rem;
    color: #5fb670;
    margin-bottom: 15px;
}

.info-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    border-right: 4px solid #5fb670;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.info-card .label {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 5px;
}

.info-card .value {
    font-size: 1.1rem;
    font-weight: bold;
    color: #1a2b4c;
}

.invoice-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.invoice-header h4 {
    color: #1a2b4c;
    font-weight: bold;
    margin-bottom: 5px;
}

.invoice-header h6 {
    color: #54aa65;
    font-weight: bold;
    margin-top: 5px;
}

.invoice-header .header-icon {
    font-size: 3rem;
    color: #000;
    margin-bottom: 10px;
}

.invoice-section {
    margin-top: 40px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    page-break-inside: avoid;
}

.invoice-section h5 {
    background-color: #1a2b4c;
    color: white !important;
    padding: 12px 20px;
    margin: 0;
    border-radius: 8px 8px 0 0;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.invoice-section span {
    background-color: #1a2b4c;
    color: white !important;
    padding: 12px 20px;
    margin: 0;
    border-radius: 8px 8px 0 0;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.invoice-section h5 i {
    margin-left: 10px;
}

.table {
    margin-bottom: 0;
    width: 100%;
}

.table th {
    background-color: #f8f9fa;
    font-weight: bold;
    border-bottom: 2px solid #dee2e6;
    text-align: center;
    vertical-align: middle;
}

.table td {
    vertical-align: middle;
    text-align: center;
    direction: ltr;
}

.table-bordered {
    border: 1px solid #dee2e6;
}

.table-secondary {
    background-color: #f8f9fa !important;
}

.text-success-DigiSign {
    color: #5fb670 !important;
    font-weight: bold;
}

.text-primary-DigiSign {
    color: #1a2b4c !important;
}

.bg-dark-DigiSign {
    background-color: #1a2b4c !important;
}

.btn-primary-DigiSign {
    background-color: #1a2b4c !important;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(26, 43, 76, 0.2);
}

.btn-success-DigiSign {
    background-color: #5fb670 !important;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(95, 182, 112, 0.2);
    transition: all 0.3s ease;
}

.btn-success-DigiSign:hover {
    background-color: #4fa560 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(95, 182, 112, 0.3);
}

footer {
    margin-top: auto;
    background: linear-gradient(135deg, #1a2b4c 0%, #0e1729 100%);
    color: white;
    padding: 30px 0;
    flex-shrink: 0;
}

footer a {
    color: #5fb670 !important;
    transition: all 0.2s ease;
}

footer a:hover {
    color: #4fa560 !important;
    text-decoration: underline !important;
}

.footer-icon {
    margin-left: 5px;
    vertical-align: middle;
}

.print-btn-container {
    margin: 30px 0;
    text-align: center;
}

.thank-you {
    background-color: #f0f9f1;
    border-radius: 10px;
    padding: 20px;
    margin-top: 30px;
    border-right: 5px solid #5fb670;
    text-align: center;
}

.thank-you i {
    color: #5fb670;
    font-size: 2rem;
    margin-bottom: 10px;
}

.info-line {
    display: none;
}

/* بخش جدید: دکمه‌های تماس و مسیریابی */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: bold;
    text-decoration: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.action-btn i {
    margin-left: 8px;
    font-size: 1.2rem;
}

.call-btn {
    background: linear-gradient(135deg, #5fb670 0%, #4fa560 100%);
    color: white !important;
}

.call-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(95, 182, 112, 0.3);
    color: white !important;
}

.navigation-btn {
    background: linear-gradient(135deg, #1a2b4c 0%, #2a3b5c 100%);
    color: white !important;
}

.navigation-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(26, 43, 76, 0.3);
    color: white !important;
}

.address-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    border-right: 4px solid #1a2b4c;
}

.address-card h6 {
    color: #1a2b4c;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.address-card h6 i {
    margin-left: 10px;
}

.address-card p {
    margin: 0;
    color: #495057;
    line-height: 1.6;
}

/* مودال مسیریابی */
.navigation-modal .modal-content {
    border-radius: 15px;
    overflow: hidden;
}

.navigation-modal .modal-header {
    background: linear-gradient(135deg, #1a2b4c 0%, #2a3b5c 100%);
    color: white;
    border-bottom: none;
}

.navigation-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: all 0.2s;
    cursor: pointer;
}

.navigation-option:hover {
    background-color: #f8f9fa;
}

.navigation-option:last-child {
    border-bottom: none;
}

.navigation-option img {
    width: 30px;
    height: 30px;
    margin-left: 15px;
    object-fit: contain;
}

.navigation-option .option-text {
    flex: 1;
}

.navigation-option .option-title {
    font-weight: bold;
    margin-bottom: 3px;
    color: #1a2b4c;
}

.navigation-option .option-desc {
    font-size: 0.85rem;
    color: #6c757d;
}

/* بخش اطلاعات داروخانه برای چاپ */
.print-pharmacy-info {
    display: none;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #ccc;
    font-size: 10pt;
    text-align: center;
    page-break-inside: avoid;
}

/* انیمیشن‌ها */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container-box {
    animation: fadeIn 0.6s ease-out forwards;
}

.invoice-section {
    animation: fadeIn 0.8s ease-out forwards;
}

/* افکت‌های hover برای جدول */
.table-hover tbody tr:hover {
    background-color: rgba(95, 182, 112, 0.05);
    transition: all 0.2s ease;
}

/* رسپانسیو بودن جدول */
@media (max-width: 768px) {
    .container-box {
        padding: 20px;
        margin: 15px;
    }

    .table td,
    .table th {
        padding: 8px;
        font-size: 14px;
    }

    .info-card {
        padding: 10px;
    }

    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }
}

/* استایل برای پرینت */
@media print {
    body {
        background: white !important;
        color: black !important;
        font-size: 9pt;
        margin: 0;
        padding: 0;
        height: auto;
        overflow: visible;
    }

    .container-box {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        background: white !important;
        animation: none !important;
        max-width: 100%;
        border-radius: 0;
        width: 100%;
        height: auto;
        page-break-after: avoid;
        page-break-before: avoid;
        page-break-inside: avoid;
    }

    .info-card {
        display: none !important;
    }

    .info-line {
        display: flex !important;
        justify-content: space-between;
        margin-bottom: 10px;
        font-size: 9pt;
        border-bottom: 1px solid #eee;
        padding-bottom: 5px;
        flex-wrap: wrap;
    }

    .info-line span {
        margin-left: 15px;
        margin-bottom: 5px;
    }

    .invoice-header {
        margin-bottom: 15px !important;
        page-break-after: avoid;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .invoice-header .header-icon {
        margin-top: 15px;
        margin-bottom: 5px;
        color: #000 !important;
    }

    .invoice-header h4 {
        font-size: 12pt;
        margin-bottom: 5px;
        color: #000 !important;
        order: 2;
    }

    .invoice-header h6 {
        font-size: 10pt;
        margin-top: 5px;
        color: #000 !important;
        order: 3;
    }

    .invoice-section {
        margin-top: 15px !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .invoice-section h5 {
        font-size: 10pt;
        padding: 8px 15px;
    }

    table {
        font-size: 8pt;
        width: 100%;
        page-break-inside: avoid;
    }

    .table th,
    .table td {
        padding: 4px !important;
    }

    .thank-you,
    .no-print,
    .print-btn-container,
    footer,
    .action-buttons,
    .address-card {
        display: none !important;
    }

    /* نمایش اطلاعات داروخانه در چاپ */
    .print-pharmacy-info {
        display: block !important;
        margin-top: 25px;
        page-break-inside: avoid;
    }

    /* جلوگیری از ایجاد صفحه خالی */
    .container-box>*:last-child {
        page-break-after: auto;
    }



    @page {
        size: A4;
        margin: 10mm;
    }
}

/* استایل‌های جدید برای بخش تبلیغات */
.ad-container {
    width: 100%;
    margin: 20px 0;
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #e0e7ff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.ad-container a {
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
}

.ad-container a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.ad-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* استایل‌های رسپانسیو برای تصویر */
@media (max-width: 768px) {
    .ad-container {
        margin: 15px 0;
        padding: 10px;
    }

    .ad-image {
        max-width: 95%;
    }
}

@media (max-width: 576px) {
    .ad-container {
        margin: 10px 0;
        padding: 8px;
    }

    .ad-image {
        max-width: 100%;
    }
}

/* برای تبلت‌ها */
@media (min-width: 769px) and (max-width: 1024px) {
    .ad-container {
        margin: 25px 0;
        padding: 20px;
    }

    .ad-image {
        max-width: 85%;
    }
}