﻿/* ---- Cookie Consent GDPR Modal ---- */
.ck-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99998;
}
.ck-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 99999;
    width: 480px;
    max-width: calc(100% - 32px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: #333;
}
.ck-header {
    padding: 20px 24px 0;
}
.ck-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}
.ck-body {
    padding: 12px 24px 16px;
}
.ck-desc {
    font-size: 13px;
    line-height: 1.55;
    color: #555;
    margin: 0 0 8px;
}
.ck-toggle-details {
    font-size: 13px;
    color: #007bff;
    text-decoration: none;
    cursor: pointer;
}
.ck-toggle-details:hover { text-decoration: underline; }

/* Categories */
.ck-details { margin-top: 12px; }
.ck-cat {
    padding: 10px 0;
    border-top: 1px solid #eee;
}
.ck-cat:last-child { border-bottom: 1px solid #eee; }
.ck-cat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ck-cat-label {
    font-weight: 600;
    font-size: 14px;
    color: #222;
}
.ck-cat-always {
    font-size: 12px;
    color: #28a745;
    font-weight: 600;
}
.ck-cat-desc {
    font-size: 12px;
    color: #888;
    line-height: 1.4;
    margin: 4px 0 0;
}

/* Toggle switch */
.ck-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}
.ck-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.ck-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    border-radius: 22px;
    transition: background-color 0.2s;
}
.ck-slider:before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}
.ck-switch input:checked + .ck-slider { background-color: #007bff; }
.ck-switch input:checked + .ck-slider:before { transform: translateX(18px); }

/* Footer buttons */
.ck-footer {
    display: flex;
    gap: 0;
    border-top: 1px solid #eee;
}
.ck-btn {
    flex: 1;
    padding: 14px 8px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.15s;
    background: #fff;
    color: #333;
    border-right: 1px solid #eee;
}
.ck-btn:last-child { border-right: none; border-radius: 0 0 12px 0; }
.ck-btn:first-child { border-radius: 0 0 0 12px; }
.ck-btn:hover { background-color: #f5f5f5; }
.ck-btn-all {
    background-color: #007bff;
    color: #fff;
}
.ck-btn-all:hover { background-color: #0056b3; }
.ck-btn-refuse { color: #666; }
.ck-btn-select { color: #333; }

@media (max-width: 480px) {
    .ck-modal { width: calc(100% - 24px); }
    .ck-footer { flex-direction: column; }
    .ck-btn { border-right: none; border-bottom: 1px solid #eee; border-radius: 0 !important; }
    .ck-btn:last-child { border-bottom: none; border-radius: 0 0 12px 12px !important; }
    .ck-btn:first-child { border-radius: 0 !important; }
}

/* Dark mode support */
body.msf-dark .ck-modal { background: #1e293b; color: #e0e0e0; }
body.msf-dark .ck-title { color: #f0f0f0; }
body.msf-dark .ck-desc { color: #aaa; }
body.msf-dark .ck-cat { border-color: #334155; }
body.msf-dark .ck-cat-label { color: #e0e0e0; }
body.msf-dark .ck-cat-desc { color: #8899aa; }
body.msf-dark .ck-footer { border-color: #334155; }
body.msf-dark .ck-btn { background: #1e293b; color: #ccc; border-color: #334155; }
body.msf-dark .ck-btn:hover { background: #263548; }
body.msf-dark .ck-btn-all { background-color: #2563eb; color: #fff; }
body.msf-dark .ck-btn-all:hover { background-color: #1d4ed8; }
body.msf-dark .ck-toggle-details { color: #60a5fa; }
/* ---- END Cookie Consent GDPR ---- */

/* ---- SweetAlert2 dark mode (msf-dark + fcv2-body-dark + dhv2-body-dark) ---- */
body.msf-dark .swal2-popup,
body.fcv2-body-dark .swal2-popup,
body.dhv2-body-dark .swal2-popup {
    background: #1e293b !important;
    color: #e0e0e0 !important;
    border: 1px solid #334155 !important;
}
body.msf-dark .swal2-title,
body.fcv2-body-dark .swal2-title,
body.dhv2-body-dark .swal2-title { color: #f0f0f0 !important; }
body.msf-dark .swal2-html-container,
body.msf-dark .swal2-content,
body.fcv2-body-dark .swal2-html-container,
body.fcv2-body-dark .swal2-content,
body.dhv2-body-dark .swal2-html-container,
body.dhv2-body-dark .swal2-content { color: #cbd5e1 !important; }
body.msf-dark .swal2-input,
body.msf-dark .swal2-textarea,
body.msf-dark .swal2-select,
body.msf-dark .swal2-file,
body.fcv2-body-dark .swal2-input,
body.fcv2-body-dark .swal2-textarea,
body.fcv2-body-dark .swal2-select,
body.fcv2-body-dark .swal2-file,
body.dhv2-body-dark .swal2-input,
body.dhv2-body-dark .swal2-textarea,
body.dhv2-body-dark .swal2-select,
body.dhv2-body-dark .swal2-file {
    background: #16213e !important;
    color: #e0e0e0 !important;
    border-color: #334155 !important;
}
body.msf-dark .swal2-validation-message,
body.fcv2-body-dark .swal2-validation-message,
body.dhv2-body-dark .swal2-validation-message {
    background: #16213e !important;
    color: #fca5a5 !important;
}
body.msf-dark .swal2-footer,
body.fcv2-body-dark .swal2-footer,
body.dhv2-body-dark .swal2-footer { color: #cbd5e1 !important; border-top-color: #334155 !important; }
body.msf-dark .swal2-close,
body.fcv2-body-dark .swal2-close,
body.dhv2-body-dark .swal2-close { color: #94a3b8 !important; }
body.msf-dark .swal2-close:hover,
body.fcv2-body-dark .swal2-close:hover,
body.dhv2-body-dark .swal2-close:hover { color: #fca5a5 !important; }
body.msf-dark .swal2-progress-steps .swal2-progress-step-line,
body.fcv2-body-dark .swal2-progress-steps .swal2-progress-step-line,
body.dhv2-body-dark .swal2-progress-steps .swal2-progress-step-line { background: #334155 !important; }
body.msf-dark .swal2-progress-steps .swal2-progress-step,
body.fcv2-body-dark .swal2-progress-steps .swal2-progress-step,
body.dhv2-body-dark .swal2-progress-steps .swal2-progress-step { background: #334155 !important; color: #cbd5e1 !important; }
body.msf-dark .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step,
body.fcv2-body-dark .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step,
body.dhv2-body-dark .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step { background: var(--solon-primary, #2563eb) !important; color: #fff !important; }
/* Cancel button on dark — pastreaza buton secondary lizibil */
body.msf-dark .swal2-cancel.swal2-styled,
body.fcv2-body-dark .swal2-cancel.swal2-styled,
body.dhv2-body-dark .swal2-cancel.swal2-styled {
    background: #334155 !important; color: #e0e0e0 !important;
}
body.msf-dark .swal2-cancel.swal2-styled:hover,
body.fcv2-body-dark .swal2-cancel.swal2-styled:hover,
body.dhv2-body-dark .swal2-cancel.swal2-styled:hover { background: #475569 !important; }
/* Backdrop putin mai opac in dark, ca sa nu distraga */
body.msf-dark .swal2-container.swal2-backdrop-show,
body.fcv2-body-dark .swal2-container.swal2-backdrop-show,
body.dhv2-body-dark .swal2-container.swal2-backdrop-show { background: rgba(0,0,0,0.6) !important; }
/* ---- END SweetAlert2 dark ---- */

/* clasa pentru checkbox-uri */
.badgebox {
    opacity: 0;
}

.badge {
    border: 1px solid #ced4da;
}

.badgebox + .badge {
    text-indent: -999999px;
    width: 27px;
    background: white;
    color: green;
}

.badgebox:focus + .badge {
    box-shadow: inset 0px 0px 5px;
}

.badgebox:checked + .badge {
    text-indent: 0;
}



/* clasa pentru table */
.divTblCompact {
    border: 1px solid #ced4da;
}

.divTblCompact table {
    border: 1px solid #ced4da;
    border-radius: 5px;
    border-collapse: collapse;
    margin: 0;
    padding: 0;
    width: 100%;
    table-layout: fixed;
    color: black;
}

.divTblCompact table tr {
    background-color: white;
    border: 1px solid #ced4da;
    padding: .35em;
    cursor: pointer;
}

.divTblCompact table th {
    padding: 1px;
    text-align: center;
}

.divTblCompact table td {
    /*padding: .625em;*/
    padding: 1px;
    text-align: left;
}

.divTblCompact table th {
    font-size: .85em;
    letter-spacing: .1em;
    /*text-transform: uppercase;*/
    font-weight: 700;
}

@media screen and (max-width: 768px) {
    .divTblCompact table {
        border: 0;
        width: 100% !important;
        min-width: 0 !important;
    }

    .divTblCompact table caption {
        font-size: 1.3em;
    }

    .divTblCompact table thead {
        border: none;
        clip: rect(0 0 0 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute !important;
        width: 1px !important;
    }

    .divTblCompact table tr {
        border-bottom: 3px solid #ced4da;
        display: block;
        margin-bottom: .625em;
    }

    .divTblCompact table td {
        border-bottom: 1px solid #ced4da;
        display: block;
        font-size: .8em;
        text-align: right !important;
    }

    .divTblCompact table td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        text-transform: uppercase;
    }

    .divTblCompact table td:last-child {
        border-bottom: 0;
    }
}

/* Varianta cu scroll orizontal (pattern FormEFacturaMesaje): pe mobil tabelul NU se mai
   sparge pe verticala cu data-label — isi pastreaza coloanele si headerul, iar containerul
   scrolleaza lateral. Tabelul are nevoie de un min-width inline ca sa nu se striveasca. */
.divTblCompact.divTblScrollX {
    overflow-x: auto;
}

@media screen and (max-width: 768px) {
    .divTblCompact.divTblScrollX table {
        border: 1px solid #ced4da;
        min-width: 640px !important;
    }

    .divTblCompact.divTblScrollX table thead {
        border: inherit;
        clip: auto;
        height: auto;
        margin: 0;
        overflow: visible;
        padding: 0;
        position: static !important;
        width: auto !important;
    }

    .divTblCompact.divTblScrollX table tr {
        border: 1px solid #ced4da;
        display: table-row;
        margin-bottom: 0;
    }

    .divTblCompact.divTblScrollX table td {
        border-bottom: 1px solid #ced4da;
        display: table-cell;
        text-align: left !important;
    }

    .divTblCompact.divTblScrollX table td::before {
        content: none;
    }
}

.randSelectat {
    background-color: #4e73df !important;
    color: white !important;
}




/* Modalele Summernote */
.note-modal {
    z-index: 2000 !important;
}
/* Umbra lor, ca să nu fie sub modalul principal */
.note-modal .modal-backdrop,
.note-modal-backdrop {
    z-index: 1990 !important;
}

/* Popover & dropdown-uri Summernote */
.note-popover,
.note-editor .dropdown-menu {
    z-index: 2001 !important;
}




/* blocare selectie text */
.noselect {
    user-select: none;
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE/Edge */
}



/* folosit pentru modale pe tot ecranul */
.modal-almost-fullscreen {
    max-width: calc(100% - 60px);
    width: 100%;
    height: calc(100% - 60px);
    margin: 30px auto; /* spațiu top/bottom + centrare orizontală */
    padding: 0;
}

.modal-almost-fullscreen .modal-content {
    height: 100%;
    border-radius: 0.25rem; /* un pic rotunjit, opțional */
    display: flex;
    flex-direction: column;
}

.modal-almost-fullscreen .modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
}



/* folosit la lista de conturi bancare din formularul de factura */
.chklist-box {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 8px;
    background-color: #fff;
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}


/* fix calendar datepicker truncated on the right */
.bootstrap-datetimepicker-widget.dropdown-menu {
    min-width: 19rem;
}


/* select2 search fix */
.input-group > .select2-container--default {
    width: auto !important;
    flex: 1 1 auto;
}

.input-group > .select2-container--default .select2-selection--single {
    line-height: inherit;
    padding: 0.5rem 1rem;
}


/* Limit toastr message to 5 lines (avoid huge stack traces filling the screen) */
#toast-container > div .toast-message {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    max-height: 7.5em;
    line-height: 1.4;
}
#toast-container > div .toast-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

/* ---- jQuery contextMenu (meniuri click-dreapta / tap pe liste) ---- */
/* Trebuie sa stea DEASUPRA antetelor sticky de tabel (care folosesc z-index mic, ex. 2)
   si a sidebar-urilor mobile (z-index 1050). Fara asta, pe telefon/tableta antetul lipit
   sus se desena PESTE meniul deschis (banda albastra prin mijlocul meniului).
   max-height + scroll = meniurile lungi nu mai ies din ecran pe mobil. */
.context-menu-list {
    z-index: 1060 !important;
    max-height: 85vh;
    overflow-y: auto;
}