/*WEB-APP*/

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f6f8;
}

.app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background: #0f172a;
    color: #fff;
    padding: 20px;
}

.sidebar h2 {
    font-size: 18px;
    margin-bottom: 20px;
}

.sidebar a {
    display: block;
    color: #cbd5e1;
    text-decoration: none;
    margin-bottom: 10px;
}

.sidebar a:hover {
    color: #fff;
}

.content {
    flex: 1;
    padding: 30px;
    background: #fff;
}

/*WEB-APP*/


#invoiceModalOverlay {position: fixed;inset: 0;background: rgba(0,0,0,0.65);display: none;align-items: center;justify-content: center;z-index: 99999;}
#invoiceModal {width: 85%;height: 92%;background: #fff;border-radius: 6px;overflow: hidden;display: flex;flex-direction: column;}
#invoiceModalHeader {display: flex;justify-content: flex-end;background: #eb5a46;padding: 8px 12px;}
#invoideModalHeaderText {color: #fff; font-size: 22px;line-height: 24px; width: calc(100% - 20px); text-align: center;}
#invoiceModalClose {cursor: pointer; color: #fff; font-size: 22px;font-weight: bold; line-height: 24px; width:20px;}
#invoiceModalBody {flex: 1;display: flex;overflow: hidden;}
#invoiceModalBody iframe {width: 100%;height: 100%;border: none;}
#emailModalOverlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 100000; }
#emailModal { background: #fff; padding: 20px; width: 600px; border-radius: 8px; }

.wrap h1 { color: #fff;padding: 15px; border-radius:10px; display: flex; gap: 10px; align-items: center; font-weight: 700;}
.form-invoice-header-button {display: inline-block; margin-right: 10px;align-content: center;}
.invoice-header { padding: 30px; background-color: #e14d43; border-radius: 10px;margin-bottom: 10px;box-shadow: rgba(0, 0, 0, 0.08) 0px 4px 12px;}
.invoice-header-button {display: inline-flex;flex-direction: column;}
.invoice-header-button-group { display: inline-flex; }
.header-buttons { margin:0px 5px;}
.invoice-buttons { background-color: #fff; padding: 30px; margin-bottom: 15px; border-radius: 10px; box-shadow: rgba(0, 0, 0, 0.08) 0px 4px 12px; }

.toggle-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; margin-left: 15px; user-select: none; }
.toggle-switch input { display: none; }
.slider { position: relative; width: 44px; height: 24px; background-color: #ccc; border-radius: 24px; transition: background-color 0.3s; }
.slider::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background-color: #fff; border-radius: 50%; transition: transform 0.3s; }
.toggle-switch input:checked + .slider { background-color: #4CAF50; }
.toggle-switch input:checked + .slider::before { transform: translateX(20px); }
.toggle-label { font-size: 14px; }

.mbk-title-periodic { background-color: #2271b1 !important;}
.mbk-periodic-active .form-table-complete, .mbk-periodic-active .factuur-footer { background-color: #2271b120;}
.mbk-periodic-active .row.sum-line .total_title, .mbk-periodic-active .row.sum-line .currency, .mbk-periodic-active .row.sum-line .amount {color: #2271b1 !important;}
.mbk-periodic-active .row.sum-line .amount {border-top: 1px solid #2271b1 !important;}
.mbk-periodic-active table.widefat { border: 1px solid #2271b1 !important; }
.mbk-periodic-active .addline, .mbk-periodic-active .button-send { background-color: #2271b1 !important; border-color: #2271b1 !important; color: #fff !important; }
.periodic-table-2 th { text-align: left;}

.mce-tinymce-inline { max-width: 470px !important; margin: 0 auto !important;}
div.mce-toolbar-grp { background: #fceae8 !important;}

p { margin: 0 !important; }
.form-table th { width: 45px;}
.regular-text { width: 100%;}
.form-table-complete { background-color: #eb5a4620;padding: 10px 20px;border-radius: 10px;box-shadow: inset rgba(0, 0, 0, 0.08) 0px 4px 12px;}

.doc-toolbar { display: flex;gap: 2px; background: #e0e3e6; width: fit-content; border-radius: 10px; margin: 0px 5px;}
.doc-toolbar .button-primary { min-width: auto !important; }
.doc-toolbar button { background: #fff; cursor: pointer;}
.doc-toolbar button:hover:not(:disabled) { background: #333; }
.doc-toolbar button:disabled { opacity: 0.4; cursor: not-allowed; }
button {transition: all .3s ease-in-out;}
button.button.button-voorbeeld, button.button.button-tijdregistratie, button.button.button-concept, .doc-toolbar .button, button.button.button-cancel {background: #e0e3e6; border: none; color: #29466a; min-height: 37px; border-radius: 10px;}
button.button.button-voorbeeld:hover, button.button.button-tijdregistratie:hover, button.button.button-concept:hover, .doc-toolbar .button:hover, button.button.button-cancel:hover {background: #333; color: #fff; border: none; }
.fa-flip-horizontal { -webkit-transform: scale(-1, 1); -ms-transform: scale(-1, 1); transform: scale(-1, 1);}

.factuur-footer { display:flex;justify-content: space-between;padding: 20px;background-color: #eb5a4620;border-radius: 10px;margin-top: 10px;box-shadow: inset rgba(0, 0, 0, 0.08) 0px 4px 12px;}
.draggable-row {transition: background 0.15s;}
.draggable-row.sortable-chosen {background: #fffae6;}
.draggable-row:hover > .re-move {opacity:1;}
.drag-handle:hover {opacity: 0.7;}
.re-move {display: flex;justify-content: space-between;align-items: center;opacity: 0;transition: opacity .3s ease-in-out; height: 30px;}
.total_title { float: left;width: 70%;text-align: right;margin-right: 5%;}
.currency { float: left; width: 0%; text-align: center;}
.amount { float: right; width: 15%; margin-right: 5%;}
.invoice_total .row { margin: 5px;padding: 0;border: none;width: 100%;float: left;}
.row.sum-line .total_title, .row.sum-line .currency, .row.sum-line .amount { font-weight: bold;color: #eb5a46;font-size: 16px;padding-top: 10px;padding-bottom: 5px;}
.remove-row-button { color:#c00;font-weight:bold;background: none;border: none;font-size: 18px;padding: 1px 0 0 0; transition: all 0.3s ease-in-out;}
.remove-row-button:hover { scale: 1.1; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { 
-webkit-appearance: none; margin: 0;}input[type="number"] { -moz-appearance: textfield;}
select {-webkit-appearance: none !important;-moz-appearance: none !important;appearance: none !important;background-image: none !important;}

.wp-core-ui select.btw { font-size: 12px; color: #2c3338; padding: 0 10px; width: 68px; text-align: right; }
.wp-core-ui select.btw:focus { border-color: #e14d43; box-shadow: 0 0 0 1px #e14d43; }
.wp-core-ui select, input, textarea, .form-table th { font-size: 12px; }
.wp-core-ui .button-primary { display:inline-block; padding: 5px 10px; font-size: 12px;min-width: 100px;border-radius: 10px;font-weight: 700;}

#togglSidebar.mbk-toggl-loading::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0.85); z-index: 9999; }
#togglSidebar.mbk-toggl-loading::before { content: ''; position: absolute; top: 50%; left: 50%; width: 42px; height: 42px; margin: -21px 0 0 -21px; border: 4px solid #ddd; border-top-color: #e14d43; border-radius: 50%; animation: mbk-spin 0.8s linear infinite; z-index: 10000; }
.tr-entry.selected { background: #eb5a4630 !important; font-weight: 600; }
.tr-entry:hover { cursor: pointer; background: #f8f8f8; }
.toggl-sidebar { position: fixed; top: 0; right: -450px; width: 450px; height: 100vh; background:#fff; box-shadow: -3px 0 15px rgba(0,0,0,0.15); z-index: 999999; display:flex; flex-direction:column; transition:right .35s ease; }
.toggl-sidebar.open { right: 0; }
.toggl-sidebar-header { display:flex; justify-content:space-between; align-items:center; padding:15px 20px; font-size:18px; background: #e14d43; color: #FFF; }
.close-btn { cursor:pointer; font-weight:bold; }
.toggl-sidebar-filters { padding:10px 20px; border-bottom:1px solid #ddd; display:flex; flex-direction:column; gap:10px; }
.toggl-sidebar-list { overflow-y:auto; flex:1; padding: 10px; box-shadow: inset rgba(0, 0, 0, 0.08) 0px 4px 12px; border: 1px solid #e14d43; margin: 20px; }
.toggl-entry { padding:10px 20px; border-bottom:1px solid #eee; display:flex; justify-content:space-between; cursor:pointer; }
.toggl-entry:hover { background:#f8f8f8; }
.toggl-entry.selected { background:#eb5a4615; border-left:6px solid #eb5a46; }
.no-entries { padding:20px; color:#999; text-align:center; }
.toggl-refresh-button { background: #e14d43; margin: 20px; }
.toggl-refresh-button button { width: 100%; padding: 10px !important; font-weight: 700; background-color: #e14d43 !important; color: #fff !important; }
@keyframes mbk-spin { to { transform: rotate(360deg); } }

.sortable-ghost {opacity: 0.4;}
.sortable-chosen {background: #fffae6;}
 
.tooltip { position: relative; display: inline-block; border-bottom: 1px dotted black; }
.tooltip .tooltiptext { visibility: hidden; width: 120px; background-color: black; color: #fff; text-align: center; border-radius: 6px; padding: 5px 0; position: absolute; z-index: 1; bottom: 100%; left: 50%; margin-left: -60px; }
.tooltip:hover .tooltiptext { visibility: visible; }

.mbk-error { border-color: #d63638 !important; border-width: 3px !important;}

/* Collapsible container */
#mbk-periodic-fields.mbk-collapsible { overflow: hidden; max-height: 0; opacity: 0; transform: translateY(0px); transition: max-height 320ms cubic-bezier(.4,0,.2,1), opacity 320ms ease, transform 320ms ease; }
#mbk-periodic-fields { will-change: max-height, opacity, transform; }
#mbk-periodic-fields { width: 860px; background-color: #2271b120; padding: 10px 20px; border-radius: 10px;  box-shadow: inset rgba(0, 0, 0, 0.08) 0px 4px 12px;}
#mbk-periodic-fields td, #mbk-periodic-fields th { padding: 5px 10px 5px 10px;}


/* Basis: altijd transitions aan op de container + tekst + icoon */
invoice-buttons, .invoice-header, #mbk-invoice-text, #mbk-invoice-icon, #mbk-periodic-fields, .wrap, .invoice-buttons, .mbk-periodic-active .form-table-complete, .mbk-periodic-active .factuur-footer { transition: all 420ms ease-in-out; }

/* Actieve (open) staat */
.wrap.mbk-periodic-active #mbk-periodic-fields { max-height: 800px; opacity: 1; transform: translateY(0); }

/* Optioneel: iets ruimte boven wanneer zichtbaar */
.wrap.mbk-periodic-active #mbk-periodic-fields { margin-top: 20px; }


.widefat input[type="number"], .widefat select.btw, .widefat .editor-subtotal, .mbk-line-editor {border: none; transition: border .13s ease-in-out;}
.widefat input[type="number"]:hover, .widefat select.btw:hover, .mbk-line-editor:hover { border: solid 2px red; }
.widefat td, .mbk-line-editor { min-height: 22px;}
.editor-subtotal, .mbk-line-editor { background-color: #fff; }
tr.draggable-row:hover { background-color: #fceae8;}

.mbk-line-editor {padding: 4px; border-radius:4px;}
.mce-edit-focus { outline: none !important;}