/* ================================================
   INLINE INVOICE DISCOUNTS - Custom Styles
   ================================================ */

/* Discount column styling */
.bill_col_discount {
    min-width: 150px;
}

.bill_col_discount .input-group-append {
    width: 60px;
}

.bill_col_discount .js_item_discount_type {
    font-size: 12px;
    padding: 0.25rem;
}

/* Hide discount column when needed */
.bill_col_discount.hidden {
    display: none !important;
}

/* Disabled button styling */
button.disabled,
a.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* [ric.bg] число непрочитанного на значках верхней панели вместо мигающей точки */
.notify .ric-notify-badge {
    position: absolute;
    z-index: 11;
    top: -18px;
    right: 3px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background-color: #ff5c6c;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    line-height: 17px;
    text-align: center;
    letter-spacing: 0;
    box-shadow: 0 0 0 2px #fff;
}

.notify .ric-notify-badge:empty {
    display: none;
}

/* [ric.bg] Быстрый просмотр файла поверх страницы (Quick Look) ------------- */
.ric-file-preview {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1080;
}
.ric-file-preview.hidden {
    display: none !important;
}
.ric-file-preview-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
}
.ric-file-preview-panel {
    position: absolute;
    top: 3vh;
    left: 50%;
    transform: translateX(-50%);
    width: 88vw;
    max-width: 1100px;
    height: 94vh;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.ric-file-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    border-bottom: 1px solid #eeeeee;
}
.ric-file-preview-title {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 15px;
}
.ric-file-preview-actions {
    white-space: nowrap;
}
.ric-file-preview-body {
    flex: 1 1 auto;
    background: #f5f5f5;
}
.ric-file-preview-body iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* [ric.bg] Папки файлов из задач ------------------------------------------- */
.ric-file-folder {
    border: 1px solid #eeeeee;
    border-radius: 4px;
    margin-bottom: 8px;
}
.ric-file-folder-head {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    user-select: none;
}
.ric-file-folder-head:hover {
    background: #fafafa;
}
.ric-file-folder-title {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ric-file-folder-actions {
    margin-left: auto;
    white-space: nowrap;
    display: flex;
    align-items: center;
}
.ric-file-folder-caret {
    transition: transform 0.15s ease;
}
.ric-file-folder.is-open .ric-file-folder-caret {
    transform: rotate(180deg);
}
.ric-file-folder-body {
    border-top: 1px solid #eeeeee;
}
.ric-file-folder-body.hidden {
    display: none !important;
}

/* [ric.bg] Ручное копирование ссылки, когда буфер недоступен ---------------- */
.ric-copy-fallback {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1090;
}
.ric-copy-fallback.hidden {
    display: none !important;
}
.ric-copy-fallback-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}
.ric-copy-fallback-panel {
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translateX(-50%);
    width: 90vw;
    max-width: 520px;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    padding: 20px;
}
.ric-copy-fallback-title {
    margin-bottom: 10px;
}

/* [ric.bg] Настраиваемые поля в карточке задачи — плотнее (было 22px между строками) */
#card-task-organisation .form-data-row {
    margin-bottom: 2px;
    padding: 3px 5px;
}

/* [ric.bg] Расчёты по делам */
.ric-fin-table th { white-space: nowrap; font-size: 12px; }
.ric-fin-table td { vertical-align: middle; font-size: 13px; }
.ric-fin-table tfoot td { border-top: 2px solid #dee2e6; }
.ric-pim-table thead th { vertical-align: middle; }
.ric-pim-table tr.ric-pim-client td { background: #f7f9fb; border-top: 2px solid #dee2e6; }

/* [ric.bg] номер задачи перед названием (видит команда) */
.ric-task-num { color: #99abb4; font-weight: 400; font-size: 0.85em; margin-right: 6px; white-space: nowrap; }
