.payment-section .expiration-notice {
    font-size: 13px;
    color: #777;
    margin-top: 15px;
}

.payment-section h3{color: #452d6b}

.nocrm-dashboard {font-size: 12px;}
.nocrm-dashboard h2 {
    font-size: 16px;
    color: #452d6b;
}
.nocrm-dashboard td a {color:#00a263;}
.nocrm-dashboard td a.nocrm-button-small {color:#fff;}
.nocrm-dashboard button {
    font-size: 10px !important;
}
#nocrm-orders-table_wrapper select{font-size: 10px;}
#nocrm-orders-table .order-title {    font-weight: 800;
    font-size: 11px;}


.nocrm-public-order-form a {color: #000;}
.nocrm-dashboard div.dt-container div.dt-layout-row {flex-direction: row-reverse;}
.nocrm-dashboard table.dataTable>tbody>tr>th,.nocrm-dashboard  table.dataTable>tbody>tr>td { padding: 5px 5px; font-size: 10px;}
#nocrm-public-order-form a {color:#452d6b}

.nocrm-notice-error {
    padding: 15px;
    margin: 10px 0;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
}
.nocrm-notice-success {
    padding: 15px;
    margin: 10px 0;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #3c763d;
    border-color: #d6e9c6;
    text-align: center;
}
.nocrm-notice-success h3{margin: 10px;}

.customer-info-box {
    margin: 0 0 25px 0;
    padding: 15px;
    border: 1px solid #452d6b;
    background: #f9f9f9;
}
.customer-info-box h4 {
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.customer-info-table {
    width: 100%;
    font-size: 14px;
}
.customer-info-table td {
    padding: 3px 0;
}
.customer-info-table td:first-child {
    width: 150px;
    color: #555;
}

.lable-sections {
    font-size: 12px;
    background-color: #452d6b;
    display: inline-block;
    padding: 0 10px;
    color: #fff;
}

.invoice-table .total-row.before-last td { font-weight: 500; font-size: 14px;}
.invoice-table .total-row.last td { font-size: 16px;}

.invoice-table td.desc-items {
    width: 40%;
}
.invoice-table td.qty-items {
    width: 10%;
}
.invoice-table td.fee-items {
    width: 25%;
}
.invoice-table td.price-items {
    width: 25%;
}


.nocrm-table-responsive-wrapper .invoice-table .item td {
    border: 1px solid #452d6b; padding: 6px;
}

.nocrm-table-responsive-wrapper .invoice-table .heading td {    background: #452d6b;
    border-bottom: none;  border-left: 1px solid #fff; color: #fff;
}
.nocrm-table-responsive-wrapper .invoice-table .heading td:last-child {border-left: 1px solid #452d6b}
.nocrm-table-responsive-wrapper .invoice-table .total-row td {border-top:none}
.nocrm-table-responsive-wrapper .invoice-table tfoot tr {border:1px solid #452d6b; padding: 10px 5px;}
.nocrm-table-responsive-wrapper .invoice-table tfoot tr td {padding: 8px 5px;}
.nocrm-table-responsive-wrapper .invoice-table tfoot tr.total-row {background-color: #e2d7f3;}
.nocrm-table-responsive-wrapper .invoice-table tfoot tr{background-color: #efe8f9;}


.invoice-box .invoice-notes {padding: 0; border: none; margin: 40px 0; line-height: 1.5em;}
.invoice-box .time-project .title-time {background-color: #452d6b; color:#fff; border-radius: 5px; padding: 2px 5px;}

ul.factor-notes {
    padding: 20px 20px 20px 0;
    margin: 25px 0;
    text-align: justify;
    border-top: 1px solid #ddd;
}
ul.factor-notes li {
    line-height: 1.8em;
    font-size: 12px;
}

.invoice-meta {
    margin-top: -10px;
    margin-bottom: 20px;
    color: #555;
}
.invoice-meta .meta-separator {
    margin: 0 10px;
    color: #ccc;
}
.nocrm-table-responsive-wrapper .invoice-table tfoot tr.offer {font-size: 12px;}

/*
 * Style for the required field indicator (*)
*/
.form-group label .required,
.terms-and-conditions label .required {
    color: #c0392b; /* A nice red color */
    font-weight: bold;
    margin-right: 3px;
}

#live-receipt-preview {
    display: flex;
    align-items: center;
} 
.payment-buttons {display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    align-items: center; }

.payment-buttons .gateway-btn { 
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    min-height: 80px;
    padding: 5px 10px;
    line-height: 1.4;
    text-align: center;
    border-radius: 10px;
    border: none;
    background-color: #00a263;
    color: #fff;
    cursor: pointer; transition: .3s;
        }
.payment-buttons .gateway-btn:hover, a#nocrm-offline-payment-trigger:hover  { 
background-color: #452d6b; transform: translate(0,-5px);
}
.payment-buttons .gateway-logo { 
            max-height: 40px; 
            width: auto; 
            margin: 0 0 8px 0 !important;
            vertical-align: middle; 
            border-radius: 5px;
            }

.payment-buttons .gateway-btn .btn-text {
    font-weight: bold;
    font-size: 14px;
}

a#nocrm-offline-payment-trigger {
    background-color: #eee;
    color: #452d6b;
}
a#nocrm-offline-payment-trigger svg{    width: 40px;
    height: 40px;
    margin-bottom: 5px;
    fill: #452d6b;
}

a#nocrm-offline-payment-trigger:hover svg{ 
    fill: #fff;
}

a#nocrm-offline-payment-trigger .btn-text {color: #452d6b; transition:.3s ;}
a#nocrm-offline-payment-trigger:hover .btn-text {color: #fff}

    .payment-buttons a {
        border-radius: 5px;
        padding: 10px 14px;
    }
    .payment-buttons a.nocrm-payment-trigger.button.button-primary.button-large {
        background-color: #00a263;
        color: #fff;
    }
    .payment-buttons a.nocrm-payment-trigger.button.button-primary.button-large:hover {background-color: #452d6b; color:#fff; transition: 0.3s;}


#nocrm-offline-modal-backdrop { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 100000; }
#nocrm-offline-modal-content { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: white; padding: 20px 30px; border-radius: 8px; z-index: 100001; width: 90%; max-width: 500px; }
.modal-header { display: flex
    ;
        justify-content: space-between;
        align-items: center;
        padding: 0; }
.modal-header h3 { margin: 0;
    font-size: 12px;line-height: 1.8em;
    display: inline-block;
    color: #fff;
    background-color: #452d6b;
    padding: 0 5px;}
#nocrm-close-modal-button {     background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    height: 20px;
    line-height: 14px;}
.bank-details {background: #f9f9f9;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #452d6b; }

.bank-details p  {    line-height: 1.5em;
        margin: 0;}
#nocrm-offline-payment-form .form-group { margin-bottom: 15px; }
#nocrm-offline-payment-form label { display: block; margin-bottom: 5px; }
#nocrm-offline-payment-form input[type="text"], #nocrm-offline-payment-form input[type="file"] { width: 100%; }
#nocrm-offline-form-message { margin-top: 15px; padding: 10px; border-radius: 4px; }

form#nocrm-offline-payment-form {
    padding: 20px;
    border: 1px solid #452d6b;
}

#offline-payment-content {font-size: 12px;}
#offline-payment-content h3.form-title {margin: 0;
    font-size: 12px;line-height: 1.8em;
    display: inline-block;
    color: #fff;
    background-color: #452d6b;
    padding: 0 5px;}

form#nocrm-offline-payment-form p {margin: 0;}

#offline-payment-content .button.button-primary , #nocrm-profile-wrapper .button.button-secondary,  #nocrm-profile-wrapper .button.button-primary, .button-primary.nocrm-modal-button, #nocrm-password-change-section .button.button-secondary , #nocrm-password-change-section .button.button-primary{background-color: #452d6b; color:#fff; transition: 0.3s;    border: none;
    padding: 10px 20px; border-radius: 10px;
    font-weight: 700; font-size: 16px; display: inline-block;
    border-radius: 5px; cursor: pointer;}
#offline-payment-content .button.button-primary:hover , #nocrm-profile-wrapper .button.button-secondary:hover,  #nocrm-profile-wrapper .button.button-primary:hover, .button-primary.nocrm-modal-button:hover,  #nocrm-password-change-section .button.button-secondary:hover , #nocrm-password-change-section .button.button-primary:hover{background-color: #00a263; color:#452d6b}
.profile-approved-notice .approved-noti{margin: 20px auto; color:#00a263}

#nocrm-otp-password-fields input[type="password"], #nocrm-otp-password-fields input#password_change_otp{width: 50%;
    padding: 8px;
    border: 1px solid #452d6b;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: 'iranyekan';
    font-size: 12px;}
#nocrm-otp-password-fields h3 {color: #00a263;
    font-size: 20px;}
#nocrm-otp-password-fields #resend-password-change-otp-link {color: #00a263; }




.modal-title-success {
    color: #27ae60; /* Green */
}

.modal-title-error {
    color: #c0392b; /* Red */
}

.modal-title-info {
    color: #2980b9; /* Blue */
}

.nocrm-notice-info {
    padding: 15px;
    margin: 10px 0;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #31708f;
    background-color: #d9edf7;
    border-color: #bce8f1;
}

.nocrm-button-small {
    display: inline-block;
    padding: 5px 10px;
    font-size: 10px;
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 3px;
}

.nocrm-button-small:hover {
    background-color: #5a6268;
    color: white;
}


#nocrm-orders-table_wrapper thead tr th {
    font-size: 10px; color: #777
}

#nocrm-orders-table_wrapper thead tr th .dt-column-header {
    flex-direction: row !important;
    text-align: right;
}

#nocrm-orders-table_wrapper tbody tr td.dt-type-numeric {
    text-align: center;
}

#nocrm-orders-table_wrapper tbody tr td.action-button {text-align: center;}




.order-detail-name {font-size: 22px; color:#452d6b;}
.order-box .event-log-box {margin-top: 50px;}
.event-log-box h3 {font-size: 18px; color:#00a263}
.order-box .event-log-box .nocrm-event-log {padding: 0;}
.order-box .event-log-box .nocrm-event-log li {    padding: 6px 0;
    font-size: 12px;}


/* --- Public Order Form Styles --- */
.nocrm-form-wrapper {
    max-width: 800px;
    margin: 20px auto;
    padding: 25px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.nocrm-form-wrapper h3 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #452d6b;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #452d6b;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: 'iranyekan';
    font-size: 12px;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding-top: 5px;
}

#nocrm-file-uploader-wrapper p {font-size: 12px;}
.form-footer {
    margin: 30px auto;
    text-align: center;
}

.form-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
}
.form-message.success { background-color: #d4edda; color: #155724; }
.form-message.error { background-color: #f8d7da; color: #721c24; }

/* Styles for the file uploader (copied from admin.css for consistency) */
#nocrm-drop-zone {
    border: 1px dashed #baafcb;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    background-color: #ede6f8;
    transition: background-color 0.3s, border-color 0.3s;
}
#nocrm-drop-zone.dragover {
    background-color: #e8f5e9;
    border-color: #4caf50;
}
.terms-and-conditions a{color:#00a263}
#nocrm-public-order-form .button.button-primary {padding: 5px 10px; border-radius: 5px; background-color: #452d6b; color: #fff; transition: 0.3s;cursor: pointer; border: none; font-size: 16px;}
#nocrm-public-order-form .button.button-primary:hover { background-color: #00a263; color: #452d6b;}


#nocrm-profile-wrapper h3 {color:#452d6b; font-size: 20px;}
#nocrm-profile-wrapper .nocrm-alert.nocrm-alert-info{    margin: 10px 0;
    border: 1px solid #00a263;
    background-color: #e3fff5;
    font-weight: 500;
    color: #00a263;
    padding: 10px 10px;
    border-radius: 5px;}
#nocrm-profile-wrapper .nocrm-alert.nocrm-alert-error{  margin: 10px 0;
    border: 1px solid orangered;
    background-color:  rgb(248, 241, 238);
    font-weight: 500;
    color: orangered;
    padding: 10px 10px;
    border-radius: 5px;}


#nocrm-profile-form .form-group {margin-bottom: 30px;}
#nocrm-profile-form h3{margin-bottom: 10px;}
#nocrm-profile-form .form-group.user-type-selector {display: flex; align-items: center; margin: 25px 0;}
#nocrm-profile-form input#email {min-width: 200px;}

#nocrm-file-list-preview .file-item { display: flex; align-items: center; padding: 8px; background: #f1f1f1; border-radius: 4px; margin-top: 8px; }
#nocrm-file-list-preview .file-name { flex-grow: 1; }
#nocrm-file-list-preview .file-status { margin-left: 15px; font-weight: bold; }
#nocrm-file-list-preview .file-status.success { color: green; }
#nocrm-file-list-preview .file-status.error { color: red; }
#nocrm-file-list-preview .remove-file-btn {     background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 10px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    margin-left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Profile Completion Modal --- */
.nocrm-modal-backdrop { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.75); z-index: 99998; }
.nocrm-modal-content { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: white; padding: 30px 40px; border-radius: 8px; z-index: 99999; text-align: center; width: 90%; max-width: 450px; box-shadow: 0 5px 20px rgba(0,0,0,0.3); }
.nocrm-modal-content h3 { margin-top: 0; font-size: 24px; }
.nocrm-modal-content p { font-size: 16px; margin-bottom: 25px; line-height: 1.6; }
.nocrm-modal-button { display: inline-block; padding: 12px 25px; font-size: 16px; text-decoration: none; border-radius: 5px; }

/* --- Profile Form Fieldset Reset --- */
.nocrm-profile-wrapper fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

/*
 * Styles for Tab-based Filters
*/
.nocrm-tabs-filter {
    display: flex;
    border-bottom: 2px solid #ddd;
    margin-bottom: 25px;
}

.nocrm-tabs-filter a {
    padding: 10px 20px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px; /* Pull the link's bottom border over the container's border */
    transition: all 0.2s ease-in-out;
}

.nocrm-tabs-filter a:hover {
    color: #000;
    background-color: #f5f5f5;
}

.nocrm-tabs-filter a.active {
    color: #452d6b; /* Main brand color */
    border-bottom-color: #452d6b;
    font-weight: bold;
}

/* استایل برای فیلدهای نامعتبر */
.form-group .is-invalid,
.is-invalid {
    border: 1px solid orangered !important; /* قرمز */
    border-radius: 10px;
}

.form-group.terms-and-conditions.is-invalid,
.is-invalid {
    border:none!important;
    border-radius: 10px;
}

/* استایل برای لیبل‌های فیلدهای نامعتبر */
.form-group.has-error label {
    color: #d9534f;
}


/* --- New Invoice Header Styles --- */
.invoice-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.header-right, .header-center, .header-left {
    display: flex;
    flex-direction: column;
}

/* Right Column */
.header-right {
    align-items: flex-start;
}

.logo-wrapper svg {
    width: 150px; /* Adjust size as needed */
    height: auto;
}
.title-pdf {display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
    }

.order-title {

    margin: 0;
    font-size: 1.1em;
    color: #452d6b;
}

/* Center Column */
.header-center {
    text-align: center;
    align-items: center;
}
.header-center h2 {
    margin: 0;
}
.invoice-type-subtitle {
    margin: 5px 0 0 0;
    font-size: 1.1em;
    color: #555;
}

/* Left Column */
.header-left {
    align-items: flex-end;
    text-align: right;
}
.status-box {
    background-color: #f0f0f1;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: bold;
    margin-bottom: 10px;
}
.meta-line {
    margin: 4px 0 0 0;
    font-size: 0.9em;
}

/* PDF download link position */
.pdf-download-link {
    text-align: left;
 
}

.pdf-download-link a {
    color: #00a263;
    background-color: #efefef;
    padding: 2px 5px;
    border-radius: 5px;
    font-weight: 500; transition: 0.3s;
}

.pdf-download-link a:hover {background-color: #452d6b; color:#fff}


.nocrm-data-table thead tr th{font-size: 10px; color: #999;}
.nocrm-data-table tbody tr {border-bottom: 1px solid #ddd;}
.nocrm-data-table tbody tr td {padding: 8px 5px;}



.invoice-header-flex {
    display: flex;
    justify-content: space-between; /* آیتم‌ها را با فاصله از هم تراز می‌کند */
    align-items: center; /* آیتم‌ها را به صورت عمودی در مرکز قرار می‌دهد */
    gap: 20px; /* ایجاد فاصله بین آیتم‌ها */
}

.invoice-header-flex > div {
    /* به صورت پیش‌فرض، هر بخش فضای مورد نیاز خود را اشغال می‌کند */
    flex: 1; 
}

/* برای تراز بهتر در حالت دسکتاپ */
.invoice-header-flex .header-right {
    text-align: right;
}

.invoice-header-flex .header-center {
    text-align: center; flex: 2; 
}

.invoice-header-flex .header-left {
    text-align: left;
    align-items: end;
}


/* ================================================================
   Styles for Single Message View Page
   ================================================================ */

/* کانتینر اصلی پیام */
.single-message-container {
    border: 1px solid #e0e0e0;
    padding: 25px 30px;
    background: #ffffff;
    border-radius: 5px;
}

/* عنوان اصلی پیام (تگ H2) */
.single-message-container .message-title {
    font-size: 24px;      /* اندازه فونت عنوان */
    color: #452d6b;       /* رنگ اصلی برند شما */
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: bold;
}

/* بخش متادیتای پیام (تاریخ ارسال) */
.single-message-container .message-meta {
    font-size: 13px;
    color: #888;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

/* محتوای اصلی پیام */
.single-message-container .message-full-content {
    line-height: 1.8;     /* فاصله بین خطوط متن */
    font-size: 15px;      /* اندازه فونت متن اصلی */
    color: #333;
}
.single-message-container .message-full-content h1, .single-message-container .message-full-content h2, .single-message-container .message-full-content h3 {color: #00a263}
.single-message-container .message-full-content h1,.single-message-container .message-full-content h2 {font-size: 20px; margin-top: 25px;}
.single-message-container .message-full-content h3 {font-size: 16px;}
/* استایل برای پاراگراف‌های داخل محتوای پیام */
.single-message-container .message-full-content p {
    margin-bottom: 1.2em;
}

/* استایل برای لینک‌های داخل محتوای پیام */
.single-message-container .message-full-content a {
    color: #00a263;       /* رنگ لینک‌ها */
    text-decoration: none;
    border-bottom: 1px dashed #00a263;
}

.single-message-container .message-full-content a:hover {
    color: #007a4b;
    border-bottom-style: solid;
}

/* دکمه بازگشت */
.nocrm-back-button {
    display: inline-block;
    margin-bottom: 20px;
    padding: 8px 15px;
    background-color: #f0f0f1;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    border: 1px solid #ccc;
    transition: background-color 0.2s;
}

.nocrm-back-button:hover {
    background-color: #e5e5e5;
}


/* Responsive Tables */
@media screen and (max-width: 782px) {
    .nocrm-table-responsive-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* For smooth scrolling on iOS */
        border: 1px solid #ddd;
    }

    /* Optional: Prevent text from wrapping inside cells on mobile */
    .nocrm-table-responsive-wrapper table th,
    .nocrm-table-responsive-wrapper table td {
        white-space: nowrap;
    }

    .invoice-header-flex {
        flex-wrap: wrap; /* مهم‌ترین بخش: به آیتم‌ها اجازه می‌دهد به خط بعدی بروند */
        justify-content: center; /* آیتم‌ها را در مرکز قرار می‌دهد */
    }

    /* فرزند اول: عرض کامل */
    .invoice-header-flex .header-right {
        flex-basis: 100%; /* عرض را 100% تعیین می‌کند */
        order: 1; /* ترتیب نمایش را اول قرار می‌دهد */
        text-align: center; /* محتوا را در مرکز قرار می‌دهد */
        margin-bottom: 20px; /* فاصله از آیتم‌های پایینی */
    }

    /* فرزند دوم: نصف عرض */
    .invoice-header-flex .header-center {
        flex-basis: 50%; /* عرض را 50% تعیین می‌کند */
        order: 2; /* ترتیب نمایش را دوم قرار می‌دهد */
        text-align: center;
    }

    /* فرزند سوم: نصف عرض */
    .invoice-header-flex .header-left {
        flex-basis: 50%; /* عرض را 50% تعیین می‌کند */
        order: 3; /* ترتیب نمایش را سوم قرار می‌دهد */
        text-align: center;
    }

    .payment-buttons {    flex-direction: column;}


}



@media print {
    /* 
     * Any element with the "no-print" class will be hidden
     * when the user tries to print the page.
    */
    .no-print {
        display: none !important;
    }

    /* Optional: Improve print layout */
    .invoice-box {
        box-shadow: none;
        border: 1px solid #000;
        margin: 0;
        max-width: 100%;
    }

    .invoice-table .heading td {
        background-color: #452d6b !important;
        color: #ffffff !important;
        -webkit-print-color-adjust: exact; /* Important for Chrome/Safari */
        print-color-adjust: exact;         /* Standard property */
    }
}


