﻿body {
    font-size: 13px !important;
}

h5 {
    font-size: 14px !important;
}

h6 {
    font-size: 13px !important;
}

h7 {
    font-size: 12px !important;
}

h8 {
    font-size: 11px !important;
}

.pd-user {
    margin-right: 0 !important;
}

.modal {
    font-size: 12px;
}

.custom-col {
    flex: 0 0 4%;
    max-width: 4%;
    padding: 0 5px;
}

.media-column-star.custom-col {
    /*  flex: 0 0 1% !important;
    max-width: 1% !important;*/
}

    .media-column-star.custom-col i {
        visibility: hidden;
    }

button {
    margin: 5px !important;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

.card-padding {
    padding: .5rem 1rem !important;
}

.signature-box {
    border: 1px dashed #4a90e2;
    padding: 15px;
    display: inline-block;
    cursor: pointer;
    background-color: #f8faff;
    border-radius: 4px;
    height: 120px;
    width: 100%;
}

    .signature-box img {
        max-height: 100px;
        max-width: 100%;
        display: block;
        margin: 0 auto;
    }

.btn-send {
    color: #0088cc !important;
    border-color: #0088cc !important;
    background-color: transparent !important;
}

    .btn-send:hover {
        color: white !important;
        background-color: #0088cc !important;
        border-color: #0088cc !important;
    }

    .btn-send:active,
    .btn-send:focus {
        color: white !important;
        background-color: #0077b5 !important;
        border-color: #0077b5 !important;
        box-shadow: 0 0 0 0.25rem rgba(0, 136, 204, 0.25) !important;
    }

/*span {
    font-weight: 300;
}*/
.select2-container--open .select2-dropdown {
    font-size: 12px;
}

.signature-wrapper {
    margin-right: 75%;
    width: fit-content;
}

.bookmark-btns {
    text-align: left;
}

    .bookmark-btns ul li {
        border: 1px solid #e6edef;
        background-color: #fff;
        display: inline-block;
        border-radius: 8px;
        transition: all 0.5s ease;
        margin: 0 4px; /* فاصله یکسان بین همه آیتم‌ها */
    }

        .bookmark-btns ul li a {
            position: relative;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 6px 8px;
            font-size: 14px;
            line-height: 1;
            color: #24695C;
            text-decoration: none;
        }

            .bookmark-btns ul li a svg,
            .bookmark-btns ul li a i svg,
            .bookmark-btns ul li a .bi svg {
                width: 1rem;
                height: 1rem;
                margin: 0;
                fill: currentColor;
                stroke: currentColor;
                stroke-width: 2;
                vertical-align: middle;
            }

            /* Bootstrap Icons size override */
            .bookmark-btns ul li a .bi {
                font-size: 1rem;
                line-height: 1;
            }

        .bookmark-btns ul li:hover {
            background-color: #24695C;
        }

            .bookmark-btns ul li:hover a {
                color: #fff;
            }

                .bookmark-btns ul li:hover a svg,
                .bookmark-btns ul li:hover a i svg,
                .bookmark-btns ul li:hover a .bi svg {
                    stroke: #fff !important;
                    fill: #fff !important;
                }

        /*   .bookmark-btns ul li:nth-child(n+2) {
            margin-left: 8px;
        }*/

        .bookmark-btns ul li:last-child {
            padding-right: 0;
            color: #24695C;
        }

            .bookmark-btns ul li:last-child a svg {
                color: #24695C;
            }

.notify-a {
    color: #fff !important;
}

[data-notify="dismiss"] {
    color: #fff;
}

#deadlineMessage a {
    cursor: pointer;
    position: relative;
    z-index: 10;
}

    #deadlineMessage a:hover {
        transform: scale(1.05);
        transition: 0.2s;
    }

#deadlineReachedModal .btn-close {
    z-index: 1055;
    left: -15px;
    right: unset;
}

.actor-switch-icon {
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
    color: #6c757d;
}

    .actor-switch-icon:hover {
        background-color: #f1f3f5;
        color: #BE0525;
        transform: rotate(180deg) scale(1.1);
    }

    .actor-switch-icon.active {
        color: #BE0525;
        background-color: #e7f1ff;
    }

/* استایل پایه برای همه جدول‌ها داخل نامه */
.letter-body table {
    border-collapse: collapse;
    width: 100%;
    margin: 10px 0;
    font-size: inherit;
}

.letter-body th,
.letter-body td {
    border: 1px solid #333;
    padding: 8px 12px;
    text-align: center;
    background-color: transparent;
}

.letter-body th {
    background-color: #f2f2f2;
    font-weight: bold;
}

/* تنظیم عرض ستون‌ها (اگر می‌خواهید خودکار نباشد) */
.letter-body colgroup col {
    /* می‌توانید width مشخص کنید */
}



/* استایل زمان در تقویم فارسی */
.datepicker-plot-area .datepicker-time-view {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important; /* تراز عمودی وسط */
    justify-content: space-between !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    padding: 5px !important;
    box-sizing: border-box !important;
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
}

    .datepicker-plot-area .datepicker-time-view > .time-segment {
        flex: 1 1 auto !important; /* عرض بر اساس محتوا (نه صفر) */
        min-width: 0 !important;
        float: none !important;
        width: auto !important;
        margin: 0 2px !important;
        display: block !important;
    }

    .datepicker-plot-area .datepicker-time-view > .divider {
        flex: 0 0 auto !important;
        float: none !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 3px !important;
        height: auto !important;
        line-height: normal !important;
        display: block !important; /* نه flex، تا اسپن داخل آن طبیعی رفتار کند */
    }

    /* حذف ارتفاع اضافی دونقطه (مهم‌ترین بخش) */
    .datepicker-plot-area .datepicker-time-view .divider,
    .datepicker-plot-area .datepicker-time-view .divider span {
        height: auto !important;
        line-height: 1 !important;
        font-size: 14px !important; /* اندازۀ دلخواه دونقطه */
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* ثابت‌سازی ارتفاع دکمه‌ها و اینپوت برای تراز بهتر */
    .datepicker-plot-area .datepicker-time-view .up-btn,
    .datepicker-plot-area .datepicker-time-view .down-btn,
    .datepicker-plot-area .datepicker-time-view input {
        height: 20px !important;
        line-height: 20px !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        padding: 0 !important;
        float: none !important;
        width: 100% !important;
    }

.delivery-title-cell {   
    vertical-align: middle !important;
}

.delivery-title-rotate {
    writing-mode: vertical-rl;
    transform: rotate(180deg);  
}

.delivery-toggle-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: #6c757d;
    transition: all 0.15s ease-in-out;
    font-size: 12px;
}

    .delivery-toggle-link:hover {
        color: #198754;
    }

    .delivery-toggle-link.active {
        color: #dc3545;
    }

.password-group {
    position: relative;
}

    .password-group .form-control {
        padding-left: 40px;
    }

    .password-group .show-hide {
        position: absolute;
        left: 12px;
        right: auto;
        top: 50%;
        transform: translateY(-50%);
        z-index: 5;
        cursor: pointer;
        color: #777;
    }

        .password-group .show-hide i {
            font-size: 16px;
        }

/* =========================================
   Outgoing Letter Details
   ========================================= */

.outgoing-letter-details {
    direction: rtl;
    width: 100%;
    color: #424242;
}


    /* =========================================
   Letter Overview
   ========================================= */

    .outgoing-letter-details .letter-overview-item {
        position: relative;
        padding: 15px 18px;
        margin-bottom: 15px;
        background-color: #f8f9fb;
        border: 1px solid #edf0f3;
        border-right: 3px solid #BC0E2A;
        border-radius: 5px;
    }


    /* عنوان اطلاعات */

    .outgoing-letter-details .letter-info-label {
        display: flex;
        align-items: center;
        gap: 9px;
        margin-bottom: 10px;
        color: #777;
        font-size: 13px;
        font-weight: 600;
    }


    /* نشانگر قرمز */

    .outgoing-letter-details .letter-info-marker {
        display: inline-block;
        flex: 0 0 7px;
        width: 7px;
        height: 7px;
        background-color: #BC0E2A;
        border-radius: 50%;
    }


    /* =========================================
   Receiver Organizations
   ========================================= */

    .outgoing-letter-details .letter-receiver-list {
        display: flex;
        flex-direction: column;
        gap: 7px;
        padding-right: 16px;
    }

    .outgoing-letter-details .letter-receiver-item {
        position: relative;
        color: #424242;
        font-size: 14px;
        line-height: 1.9;
    }

        .outgoing-letter-details .letter-receiver-item::before {
            content: "";
            position: absolute;
            right: -13px;
            top: 12px;
            width: 5px;
            height: 5px;
            background-color: #b7b7b7;
            border-radius: 50%;
        }


    /* =========================================
   Letter Subject
   ========================================= */

    .outgoing-letter-details .letter-subject {
        color: #333;
        font-size: 15px;
        font-weight: 600;
        line-height: 2;
    }


    /* =========================================
   Letter Body
   ========================================= */

    .outgoing-letter-details .letter-body-section {
        margin-top: 25px;
        padding: 5px 3px 20px;
    }

    .outgoing-letter-details .letter-section-heading {
        display: flex;
        align-items: center;
        gap: 10px;
        padding-bottom: 13px;
        margin-bottom: 20px;
        color: #555;
        font-size: 14px;
        font-weight: 600;
        border-bottom: 1px solid #e9ecef;
    }

    .outgoing-letter-details .letter-body {
        color: #333;
        font-size: 14px;
        line-height: 2.2;
        text-align: justify;
        overflow-wrap: break-word;
    }

        /* تصاویر احتمالی داخل متن نامه */

        .outgoing-letter-details .letter-body img {
            max-width: 100%;
            height: auto;
        }


    /* =========================================
   Signature
   ========================================= */

    .outgoing-letter-details .letter-signature-section {
        display: flex;
        justify-content: flex-end;
        margin-top: 25px;
        padding-top: 20px;
        border-top: 1px solid #edf0f3;
    }

    .outgoing-letter-details .letter-signature-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        min-width: 180px;
        max-width: 240px;
    }

    .outgoing-letter-details .letter-signature-image {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 180px;
        min-height: 75px;
        padding: 8px;
        background-color: #fafafa;
        border: 1px solid #e9ecef;
        border-radius: 5px;
    }

        .outgoing-letter-details .letter-signature-image img {
            display: block;
            max-width: 100%;
            max-height: 100px;
            object-fit: contain;
        }

    .outgoing-letter-details .letter-signature-name {
        margin-top: 10px;
        color: #424242;
        font-size: 13px;
        font-weight: 600;
        line-height: 1.9;
        text-align: center;
    }


/* =========================================
   Responsive
   ========================================= */

/* =========================================
   Outgoing Letter Details
   ========================================= */

.outgoing-letter-details {
    direction: rtl;
    width: 100%;
    color: #424242;
}


/* =========================================
   Main Heading
   ========================================= */

.letter-details-heading {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-bottom: 20px;

    color: #343a40;
    font-size: 16px;
    font-weight: 700;
}

.letter-details-heading svg {
    width: 20px;
    height: 20px;
    color: #BC0E2A;
}


/* =========================================
   Detail Cards
   ========================================= */

.letter-detail-card {
    width: 100%;
    margin-bottom: 16px;
    padding: 18px 20px;

    background: #fff !important;

    border: 1px solid #e4e7ec !important;
    border-radius: 9px !important;

    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.04) !important;

    transition: box-shadow 0.2s ease;
}

.letter-detail-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07) !important;
}


/* =========================================
   Card Header
   ========================================= */

.letter-detail-header {
    display: flex;
    align-items: center;
    gap: 13px;

    padding-bottom: 15px;
    margin-bottom: 15px;

    border-bottom: 1px solid #edf0f3;
}


/* Icon Container */

.letter-detail-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 43px;

    width: 43px;
    height: 43px;

    background: #fff1f3;
    border-radius: 9px;
}

.letter-detail-icon svg {
    width: 21px;
    height: 21px;

    color: #BC0E2A;
    stroke-width: 1.8;
}


/* Card Title */

.letter-detail-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.letter-detail-title h6 {
    margin: 0;

    color: #343a40;
    font-size: 14px;
    font-weight: 700;
}

.letter-detail-title span {
    color: #9299a2;
    font-size: 11px;
}


/* =========================================
   Card Content
   ========================================= */

.letter-detail-content {
    padding-right: 5px;

    color: #424242;
    font-size: 14px;
    line-height: 2;
}


/* =========================================
   Receiver List
   ========================================= */

.letter-receiver-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.letter-receiver-item {
    position: relative;

    padding: 6px 16px;

    color: #424242;
    font-size: 13px;
    line-height: 1.9;
}

.letter-receiver-item::before {
    content: "";

    position: absolute;
    right: 0;
    top: 17px;

    width: 6px;
    height: 6px;

    background: #BC0E2A;
    border-radius: 50%;
}


/* =========================================
   Subject
   ========================================= */

.letter-subject {
    color: #343a40;
    font-size: 14px;
    font-weight: 600;
    line-height: 2;
}


/* =========================================
   Letter Body
   ========================================= */

.letter-body {
    padding: 5px 3px;

    color: #424242;
    font-size: 14px;
    line-height: 2.2;

    text-align: justify;

    overflow-wrap: break-word;
}

.letter-body img {
    max-width: 100%;
    height: auto;
}


/* =========================================
   Signature
   ========================================= */

.letter-signature-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.letter-signature-image {
    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 150px;
    min-height: 85px;
    padding: 10px 15px;

    background: #fafafa;
    border: 1px dashed #d7dce2;
    border-radius: 7px;
}

.letter-signature-image img {
    display: block;

    max-width: 200px;
    max-height: 100px;

    object-fit: contain;
}

.letter-signature-name {
    color: #343a40;
    font-size: 14px;
    font-weight: 700;

    padding: 5px 12px;
}
