.hidden, .clkHide { display: none; }
/*input.numero {max-width: 130px; text-align:  right;} con MDB5 non funziona pi� max-width */
input.numero {text-align:  right;}
.has-error {background-color: rgba(244, 67, 54, 0.3);}
.capitalize { text-transform: capitalize; }
.clk-small { font-size: 14px; }
.clk-small-2 { font-size: 12px; }
.clk-font-sm { font-size: 12px; }
.clk-small-3 { font-size: 10px; }

table.display.dataTable > tbody > tr.selected > *,
table.display.dataTable > tbody > tr.odd.selected > *,
table.display.dataTable > tbody > tr.selected:hover > *  {
  box-shadow: inset 0 0 0 9999px red;
}
.clk-link { cursor: pointer; }
.clk-clickable tbody tr,
.clk-clickable { cursor: pointer; }

/* Default browser font size https://stackoverflow.com/questions/28678542/how-to-change-bootstraps-global-default-font-size */
/*
html {
  font-size: 14px;
}
*/

.select-dropdown-container {
  min-width: 500px !important;
}
.select-dropdown-container .select-option {
	font-size: 0.8rem;
}
.select-dropdown-container .input-group {
  padding: 8px;
}
.select-dropdown-container .select-filter-input {
  font-size: 0.8rem;
  height: calc(1.664rem + 2px);
  min-height: calc(1.664rem + 2px);
  padding-top: 0.216rem;
  padding-bottom: 0.216rem;
}
.select-dropdown-container .select-no-results {
  font-size: 0.8rem;
}

/* Fix per input di ricerca MDB5 nelle modali */
.modal .select-filter-input {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 10001 !important;
    background-color: white !important;
    border: 1px solid #ddd !important;
    outline: none !important;
}

.modal .select-filter-input:focus {
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25) !important;
}

/* Fix per input di ricerca MDB5 nelle modali - DARK MODE */
[data-mdb-theme="dark"] .modal .select-filter-input {
    background-color: #2b2b2b !important;
    color: #fff !important;
    border: 1px solid #444 !important;
}

[data-mdb-theme="dark"] .modal .select-filter-input:focus {
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25) !important;
}

[data-mdb-theme="dark"] .modal .select-filter-input::placeholder {
    color: #aaa !important;
}

.modal .select-dropdown {
    z-index: 10000 !important;
}

.modal .select-dropdown-container {
    z-index: 9999 !important;
}

/* Ensure modals appear above side panels (ClkSidePanel uses z-index 1055-1056) */
.modal {
    z-index: 1060 !important;
}

.modal-backdrop {
    z-index: 1059 !important;
}

.notransition {
  -webkit-transition: none !important;
  -moz-transition: none !important;
  -o-transition: none !important;
  transition: none !important;
}

/* Removed fixed black color for form labels to allow dark mode adaptation */
/* .form-label { color: black !important; } */

table.dataTable tbody th, table.dataTable tbody td {
  padding: 4px 8px;
  /* padding: 8px 10px; */
}

ul.dropdown-menu > li {
  line-height: 0.8em;
  margin: 0px 0px 0px 0px; /* 3px margin plus 1px for the border */
}

.btn {
  text-transform: none;
}

.form-check {
  font-size: 0.875rem;
  top: 2px; /* Ridotto da 4px per meno spazio */
  margin-bottom: 0.25rem; /* Riduce spazio tra radio button consecutivi */
  padding-left: 1rem; /* Riduce padding per adattarsi meglio allo spazio */
}

.accordion-button {
  padding-top: 6px;
  padding-bottom: 6px;
}

/* Radio button specifici per Intraweb - NON MDB5 */
input[type="radio"]:not(.form-check-input) {
  margin-top: 2px; /* Ridotto da 6px per meno spazio verticale */
  margin-bottom: 2px; /* Ridotto da 6px per meno spazio verticale */
  margin-left: 4px; /* Ridotto da 8px per meno spazio a sinistra */
  margin-right: 2px; /* Ridotto da 4px per meno distanza dalla label */
  width: 14px;  /* Mantiene dimensione del radio button */
  height: 14px; /* Mantiene forma circolare */
}
input[type="radio"]:not(.form-check-input):first-child {
  margin-top: 2px; /* Ridotto da 6px per meno spazio verticale */
  margin-bottom: 2px; /* Ridotto da 6px per meno spazio verticale */
  margin-left: 4px; /* Ridotto da 8px per meno spazio a sinistra */
  margin-right: 2px; /* Ridotto da 4px per meno distanza dalla label */
  width: 14px;  /* Mantiene dimensione del radio button */
  height: 14px; /* Mantiene forma circolare */
}

/* Stili aggiuntivi per radio button più compatti */
.form-check-input[type="radio"] {
  margin-right: 0.25rem; /* Distanza minima tra radio e label */
}

.form-check-label {
  margin-left: 0; /* Elimina margin extra della label */
  padding-left: 0.1rem; /* Piccolissimo padding per leggibilità */
}

/* Radio button containers più compatti */
.form-check-inline {
  margin-right: 0.5rem; /* Spazio ridotto tra radio button inline */
}

/* Per gruppi di radio button, riduci padding generale */
.radio-group, .form-check-group {
  padding: 0.25rem;
  gap: 0.25rem;
}

/* Stili specifici per radio button IntraWeb - esclude MDB5 */
input[type="RADIO"]:not(.form-check-input), 
input[type="radio"]:not(.form-check-input) {
  margin-top: 2px !important;
  margin-bottom: 2px !important;
  margin-left: 2px !important;
  margin-right: 0px !important; /* Azzerato per test */
  width: 14px !important;
  height: 14px !important;
}

/* Target specifico per radio button IntraWeb con pattern name *_INPUT */
input[name$="_INPUT"][type="RADIO"], 
input[name$="_INPUT"][type="radio"] {
  margin-top: 1px !important;
  margin-bottom: 1px !important;
  margin-left: 1px !important;
  margin-right: 0px !important; /* Azzerato completamente */
  width: 14px !important;
  height: 14px !important;
  vertical-align: middle !important;
}

/* Target per radio button con classe placeholder-active */
input.placeholder-active[type="RADIO"],
input.placeholder-active[type="radio"] {
  margin-top: 1px !important;
  margin-bottom: 1px !important;
  margin-left: 1px !important;
  margin-right: 0px !important; /* Azzerato completamente */
  vertical-align: text-top !important;
}

/* Selettori ultra-specifici per forzare gli stili - Azzeramento completo margin-right */
input[id*="_INPUT_"][type="RADIO"],
input[id*="QOKCAR_INPUT_"][type="RADIO"],
input[name$="_INPUT"][type="RADIO"] {
  margin: 1px 0px 1px 1px !important; /* margin: top right bottom left - right = 0px */
  padding: 0 !important;
  width: 14px !important;
  height: 14px !important;
}

/* Riduce spazio tra radio button consecutivi in contenitori IntraWeb */
div:has(input[name$="_INPUT"][type="RADIO"]) {
  margin-bottom: 2px !important;
  line-height: 1.2 !important;
}

/* Stili per label adiacenti ai radio IntraWeb - esclude MDB5 */
input[type="RADIO"]:not(.form-check-input) + label,
input[type="radio"]:not(.form-check-input) + label,
label:has(+ input[type="RADIO"]:not(.form-check-input)),
label:has(+ input[type="radio"]:not(.form-check-input)) {
  margin-left: 0 !important;
  padding-left: 0px !important; /* Ridotto da 2px a 0px per distanza minima */
  vertical-align: middle !important;
}

/* Stili specifici per span che seguono i radio button IntraWeb - esclude MDB5 */
input[type="RADIO"]:not(.form-check-input) + span,
input[type="radio"]:not(.form-check-input) + span {
  margin-left: 0px !important; /* Elimina completamente lo spazio tra radio e span */
  padding-left: 3px !important; /* Aumentato da 1px a 3px per leggibilità ottimale */
  vertical-align: middle !important;
  display: inline !important;
}

/* Target specifico per span dentro i gruppi radio IntraWeb */
div[data-type="IWRADIOGROUP"] span {
  margin-left: 0px !important;
  padding-left: 3px !important; /* Aumentato da 1px a 3px */
  margin-right: 8px !important; /* Spazio tra le opzioni consecutive */
}

/* Migliora l'allineamento generale dei radio group IntraWeb */
div[data-type="IWRADIOGROUP"] {
  line-height: 1.2 !important;
  display: flex !important;
  align-items: center !important;
  gap: 0px !important; /* Elimina gap tra elementi */
}

.clk-radio-container {
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 0px;
  position: relative;
  margin-top: 0px; /* Aggiusta secondo necessità */
  /* background-color: #f9f9f9; */
}

.clk-radio-container legend {
 
  position: absolute;
  top: -1px; /* Questo valore posiziona la legend a metà del testo sulla linea del bordo */
  transform: translateY(-50%);
  left: 10px; /* Distanza dal bordo sinistro, regola secondo necessità */
  padding: 0 3px;
  background-color: white; /* O il colore di sfondo della tua pagina */
  margin: 0;
  font-weight: bold;
  font-size: 10px; /* Regola secondo necessità */
  line-height: 1; /* Assicura che l'altezza della legend sia precisa */
  width: auto; /* Permette alla legend di adattarsi al contenuto */
  display: inline-block; /* Fa sì che la legend si adatti al suo contenuto */

  max-width: calc(100% - 20px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

}

#mainTB span {
  font-size: 15px; /* Adjust the font size as needed - Font delle opzioni del menu principale*/
  font-weight: bold;
}

.-clk-menu-400{ /* Serve per costringere lo scrolling altrimenti non appare nella modalità mobile */
  max-height:400px;
  overflow-y: scroll;
}

.clk-menu-50 {
  max-height: 50vh; /* usa il 90% dell'altezza della viewport */
  overflow-y: auto; /* 'auto' è preferibile a 'scroll' per non mostrare la barra quando non serve */
  /* Smooth scrolling per mobile - rimosso -webkit-overflow-scrolling deprecato */
}

/* ========================================================================
   SIMPLIFIED FIELD VALIDATION - USING ONLY MDB5 bg-warning CLASS
   Clean and simple approach for mandatory field validation
   ======================================================================== */

/* Override default MDB5 bg-warning to be more subtle for form validation */
.form-outline.bg-warning {
    background-color: rgba(255, 193, 7, 0.15) !important;
    border-color: rgba(255, 193, 7, 0.6) !important;
}

/* Ensure text remains readable */
.form-outline.bg-warning .form-control {
    color: inherit !important;
}

/* Keep the original has-error class for backward compatibility */
.has-error {
    background-color: rgba(244, 67, 54, 0.3);
}

/* ========================================================================
   ENHANCED TOAST STYLES FOR MDB5
   Improved styling for toast notifications with rounded corners and better spacing
   ======================================================================== */

/* Toast container positioning and styling */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1070;
    pointer-events: none;
}

/* Enhanced toast styling with proper rounded corners */
.toast {
    pointer-events: auto;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
    border: none !important;
    overflow: hidden !important;
    margin-bottom: 12px;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

/* Toast header improvements */
.toast-header {
    border-radius: 12px 12px 0 0 !important;
    border-bottom: none !important;
    padding: 12px 16px 8px 16px !important;
    font-weight: 600 !important;
}

/* Toast body improvements */
.toast-body {
    border-radius: 0 0 12px 12px !important;
    padding: 8px 16px 12px 16px !important;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Close button styling */
.toast .btn-close {
    padding: 0.5rem !important;
    margin: -0.25rem -0.5rem -0.25rem auto !important;
    opacity: 0.8 !important;
}

.toast .btn-close:hover {
    opacity: 1 !important;
}

/* Color-specific improvements for better visibility */
.toast .bg-success {
    background-color: #198754 !important;
}

.toast .bg-warning {
    background-color: #fd7e14 !important;
}

.toast .bg-danger {
    background-color: #dc3545 !important;
}

.toast .bg-info {
    background-color: #0dcaf0 !important;
}

/* Dark mode support for toasts */
[data-mdb-theme="dark"] .toast {
    background-color: #2d3748 !important;
    color: #e2e8f0 !important;
}

[data-mdb-theme="dark"] .toast .bg-light {
    background-color: #4a5568 !important;
    color: #e2e8f0 !important;
}

/* Animation improvements */
.toast.fade:not(.show) {
    opacity: 0;
    transform: translateX(100%);
}

.toast.fade.show {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.3s ease-in-out;
}

/* Mobile responsive */
@media (max-width: 576px) {
    #toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
    }
    
    .toast {
        width: 100% !important;
        max-width: none !important;
    }
}

/* ========================================================================
   DATEPICKER KEYBOARD SHORTCUT TOOLTIP
   Enhanced tooltip for MDB5 datepicker icon showing keyboard shortcuts
   ======================================================================== */

/* Enhanced tooltip styling for datepicker shortcut information */
.clk-datepicker-shortcut-tooltip {
    font-size: 11px !important;
    max-width: 250px !important;
    white-space: pre-line !important;
    text-align: left !important;
    line-height: 1.4 !important;
    pointer-events: none !important; /* Ensure tooltip doesn't interfere with clicks */
}

.clk-datepicker-shortcut-tooltip .tooltip-inner {
    padding: 10px 12px !important;
    background-color: #2c3e50 !important;
    border-radius: 6px !important;
    text-align: left !important;
    pointer-events: none !important; /* Ensure tooltip doesn't interfere with clicks */
}

/* Ensure better visibility of the enhanced tooltip */
.clk-datepicker-shortcut-tooltip .tooltip-arrow {
    border-top-color: #2c3e50 !important;
    pointer-events: none !important;
}

/* Make sure datepicker toggle button remains clickable */
.datepicker-toggle-button,
[data-mdb-datepicker-toggle] {
    pointer-events: auto !important;
    z-index: 10 !important;
}

/* Dark mode support for enhanced tooltip */
[data-mdb-theme="dark"] .clk-datepicker-shortcut-tooltip .tooltip-inner {
    background-color: #1a202c !important;
    color: #e2e8f0 !important;
}

[data-mdb-theme="dark"] .clk-datepicker-shortcut-tooltip .tooltip-arrow {
    border-top-color: #1a202c !important;
}

/* ========================================================================
   ENHANCED DATEPICKER WITH KEYBOARD SHORTCUTS - NON-INTRUSIVE INDICATOR
   Styling for the separate keyboard shortcut indicator for MDB5 datepicker
   ======================================================================== */

/* Enhanced Datepicker with Keyboard Shortcuts - Non-intrusive indicator */
.clk-datepicker-shortcut-indicator {
    position: absolute;
    top: 50%;
    right: 35px; /* Position to the left of the datepicker icon */
    transform: translateY(-50%);
    z-index: 1;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    pointer-events: auto;
    cursor: help;
    padding: 2px;
    border-radius: 3px;
}

.clk-datepicker-shortcut-indicator:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.05);
}

/* Dark mode support for the indicator */
@media (prefers-color-scheme: dark) {
    .clk-datepicker-shortcut-indicator:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
}

/* Tooltip styling for keyboard shortcuts */

/* MDB5 select field validation styling using standard bg-warning class */
select.bg-warning,
.form-outline.bg-warning select {
    background-color: rgba(255, 193, 7, 0.15) !important;
    border-color: rgba(255, 193, 7, 0.6) !important;
}

.form-outline.bg-warning .select-input,
.form-outline.bg-warning .select-wrapper {
    background-color: rgba(255, 193, 7, 0.15) !important;
    border-color: rgba(255, 193, 7, 0.6) !important;
}

.select-wrapper.bg-warning .select-input {
    background-color: rgba(255, 193, 7, 0.15) !important;
    border-color: rgba(255, 193, 7, 0.6) !important;
}

/* Modern CSS override for deprecated -ms-high-contrast from MDB5 CSS */
@media (forced-colors: active) {
  .ps {
    overflow: auto !important;
  }
}

/* Add modern accessibility support for high contrast mode */
@media (prefers-contrast: high) {
  /* Enhanced contrast styles for better accessibility */
  .table {
    border: 2px solid !important;
  }
  
  .btn {
    border: 2px solid !important;
  }
  
  .form-control, .form-select {
    border: 2px solid !important;
  }
}

/* ========================================================================
   INTRAWEB RADIO BUTTON FIX FOR MDB5 v7
   Fix per radio button generati da Intraweb server-side - ESCLUDE MDB5
   ======================================================================== */

/* Fix per radio button Intraweb con type="RADIO" - esclude .form-check-input */
input[type="RADIO"]:not(.form-check-input), 
input[type="radio"]:not(.form-check-input) {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 1.2em;
  height: 1.2em;
  border: 2px solid #6f6f6f;
  border-radius: 50%;
  margin-right: 0.5em;
  margin-top: 0;
  margin-bottom: 0;
  vertical-align: middle;
  position: relative;
  cursor: pointer;
  background-color: transparent;
  transition: all 0.2s ease-in-out;
}

/* Stato checked per radio button - esclude .form-check-input */
input[type="RADIO"]:not(.form-check-input):checked,
input[type="radio"]:not(.form-check-input):checked {
  border-color: #1266f1;
  background-color: #1266f1;
}

/* Punto interno quando checked - esclude .form-check-input */
input[type="RADIO"]:not(.form-check-input):checked::before,
input[type="radio"]:not(.form-check-input):checked::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background-color: white;
}

/* Dark mode support per radio button - esclude .form-check-input */
[data-mdb-theme="dark"] input[type="RADIO"]:not(.form-check-input),
[data-mdb-theme="dark"] input[type="radio"]:not(.form-check-input) {
  border-color: #adb5bd;
}

[data-mdb-theme="dark"] input[type="RADIO"]:not(.form-check-input):checked,
[data-mdb-theme="dark"] input[type="radio"]:not(.form-check-input):checked {
  border-color: #0d6efd;
  background-color: #0d6efd;
}

/* Container per radio group Intraweb */
.clk-radio-container {
  border: 1px solid var(--mdb-border-color);
  border-radius: var(--mdb-border-radius);
  padding: 0.375rem 1rem 0.25rem 1rem; /* Ancora più compatto */
  position: relative;
  background-color: transparent;
  margin-bottom: 1rem;
  margin-top: 0.25rem; /* Spazio ridotto per la legend */
}

/* Dark mode per container */
[data-mdb-theme="dark"] .clk-radio-container {
  border-color: var(--mdb-border-color);
  background-color: transparent;
}

/* Legend styling - stile MDB5 sovrapposta al bordo */
.clk-radio-container legend {
  position: absolute;
  top: -0.0em; /* Abbassato ulteriormente */
  left: 0.75rem;
  padding: 0 0.25rem;
  background-color: var(--mdb-body-bg);
  color: var(--mdb-body-color-50); /* Colore tenue usando CSS custom property */
  font-size: 0.75rem;
  font-weight: 400;
  margin: 0;
  border: none;
  width: auto;
  line-height: 1;
}

/* Dark mode per legend - usa variabili MDB5 */
[data-mdb-theme="dark"] .clk-radio-container legend {
  background-color: var(--mdb-dark-bg) !important;
  color: var(--mdb-dark-color-50) !important;
}

/* Intraweb radio group container */
div[data-type="IWRADIOGROUP"] {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

/* Intraweb radio option styling */
div[data-type="IWRADIOGROUP"] input + span {
  margin-right: 1rem;
  cursor: pointer;
  user-select: none;
  color: var(--mdb-body-color, #212529);
}

/* Dark mode per span labels */
[data-mdb-theme="dark"] div[data-type="IWRADIOGROUP"] input + span {
  color: var(--mdb-dark-color, #dee2e6);
}

/* Hover effects - esclude .form-check-input */
input[type="RADIO"]:not(.form-check-input):hover,
input[type="radio"]:not(.form-check-input):hover {
  border-color: #1266f1;
  box-shadow: 0 0 0 0.2rem rgba(18, 102, 241, 0.25);
}

/* Focus effects - esclude .form-check-input */
input[type="RADIO"]:not(.form-check-input):focus,
input[type="radio"]:not(.form-check-input):focus {
  outline: none;
  border-color: #1266f1;
  box-shadow: 0 0 0 0.2rem rgba(18, 102, 241, 0.25);
}

/* Disabled state - esclude .form-check-input */
input[type="RADIO"]:not(.form-check-input):disabled,
input[type="radio"]:not(.form-check-input):disabled {
  opacity: 0.6;
  cursor: not-allowed;
  border-color: #6c757d;
}

input[type="RADIO"]:not(.form-check-input):disabled + span,
input[type="radio"]:not(.form-check-input):disabled + span {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ========================================================================
   FIX AUTOCOMPLETE EDGE/CHROME - DARK MODE COMPATIBILITY
   Fix per campi auto-compilati di Edge/Chrome che risultano illeggibili
   ======================================================================== */

/* Fix per campi auto-compilati di Edge/Chrome */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--mdb-body-bg, #fff) inset !important;
    -webkit-text-fill-color: var(--mdb-body-color, #212529) !important;
    color: var(--mdb-body-color, #212529) !important;
    background-color: var(--mdb-body-bg, #fff) !important;
}

/* Per il tema scuro */
[data-mdb-theme="dark"] input:-webkit-autofill,
[data-mdb-theme="dark"] input:-webkit-autofill:hover,
[data-mdb-theme="dark"] input:-webkit-autofill:focus,
[data-mdb-theme="dark"] input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #212529 inset !important;
    -webkit-text-fill-color: #fff !important;
    color: #fff !important;
    background-color: #212529 !important;
}

/* ========================================================================
   RADIO BUTTONS SMALL - SIMPLE TRANSFORM APPROACH
   Riduce dimensioni radio button E container mantenendo MDB5 standard
   ======================================================================== */

.radio-sm input[type="radio"] {
  transform: scale(0.70);
}

/* Riduce anche l'altezza del container per i radio small */
.clk-radio-container.radio-sm {
  padding: 0.1rem 1rem 0.05rem 1rem !important; /* Frame ancora più basso */
  margin-bottom: 0.2rem !important;
  line-height: 1.1 !important; /* Compatta le righe */
}

/* Abbassa i radio button per allinearli meglio */
.radio-sm input[type="radio"] {
  margin-top: 4px !important; /* Abbassa i pallini */
}

/* Rimuove le modifiche alle label che le alzavano */
.radio-sm .form-check-label {
  margin-top: 7px !important; /* Lascia le label nella posizione normale */
}

/* DataTables Copy modal fix - semplice e compatibile dark/light */
.dt-button-info {
    opacity: 1 !important;
    background: #fff !important;
    color: #000 !important;
    border: 1px solid #ddd !important;
}

/* Dark mode */
[data-mdb-theme="dark"] .dt-button-info {
    background: #212529 !important;
    color: #fff !important;
    border-color: #495057 !important;
}

/* ========================================================================
   MARKDOWN CONTENT INSIDE AI MONITOR
   Styling for rendered Markdown in the AI analysis results
   ======================================================================== */

.clk-md-content h1 { font-size: 1.4rem; margin-top: 0.5rem; }
.clk-md-content h2 { font-size: 1.2rem; margin-top: 1rem; }
.clk-md-content h3 { font-size: 1.05rem; }
.clk-md-content table { font-size: 0.875rem; }
.clk-md-content ul, .clk-md-content ol { padding-left: 1.5rem; }

/* ========================================================================
   INTRAWEB NOTIFICATION DIALOG (IWNOTIFY) - DARK MODE FIX
   Fix per dialoghi di notifica IntraWeb in modalità scura
   ======================================================================== */

/* IntraWeb notification dialog base styling */
.iwnotify {
    z-index: 10000 !important;
}

.iwnotify-dialog {
    background: var(--mdb-body-bg, #fff) !important;
    color: var(--mdb-body-color, #212529) !important;
    border: 1px solid var(--mdb-border-color, #dee2e6) !important;
    border-radius: 0.375rem !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.iwnotify-inner {
    background: transparent !important;
    color: inherit !important;
}

.iwnotify-message {
    color: var(--mdb-body-color, #212529) !important;
    margin: 1rem 0 !important;
    line-height: 1.5 !important;
}

/* IntraWeb notification buttons */
.iwnotify-button {
    background: var(--mdb-primary, #0d6efd) !important;
    color: #fff !important;
    border: 1px solid var(--mdb-primary, #0d6efd) !important;
    border-radius: 0.375rem !important;
    padding: 0.375rem 0.75rem !important;
    cursor: pointer !important;
    transition: all 0.15s ease-in-out !important;
}

.iwnotify-button:hover {
    background: var(--mdb-primary-dark, #0b5ed7) !important;
    border-color: var(--mdb-primary-dark, #0b5ed7) !important;
}

.iwnotify-button-default {
    background: var(--mdb-secondary, #6c757d) !important;
    border-color: var(--mdb-secondary, #6c757d) !important;
}

.iwnotify-button-default:hover {
    background: var(--mdb-secondary-dark, #5c636a) !important;
    border-color: var(--mdb-secondary-dark, #5c636a) !important;
}

.iwnotify-buttons {
    text-align: right !important;
    padding: 0.5rem 1rem 1rem 1rem !important;
}

/* Dark mode specific styling */
[data-mdb-theme="dark"] .iwnotify-dialog {
    background: var(--mdb-dark-bg, #212529) !important;
    color: var(--mdb-dark-color, #dee2e6) !important;
    border-color: var(--mdb-dark-border-color, #495057) !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3) !important;
}

[data-mdb-theme="dark"] .iwnotify-message {
    color: var(--mdb-dark-color, #dee2e6) !important;
}

/* Ensure reset focus links are properly styled */
.iwnotify-resetFocus {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Alert specific styling for error notifications */
.iwnotify-alert .iwnotify-dialog {
    border-color: var(--mdb-danger, #dc3545) !important;
    border-left: 4px solid var(--mdb-danger, #dc3545) !important;
}

[data-mdb-theme="dark"] .iwnotify-alert .iwnotify-dialog {
    border-color: var(--mdb-danger, #dc3545) !important;
}

/* ========================================================================
   HELP POPOVER - WIDE VERSION
   Override max-width for help popovers that contain tables/detailed content
   ======================================================================== */

.popover.popover-help-wide {
    max-width: 500px !important;
}

.popover.popover-help-wide .popover-body {
    max-height: 400px;
    overflow-y: auto;
}

/* Dark mode support */
[data-mdb-theme="dark"] .popover.popover-help-wide {
    background-color: var(--mdb-dark-bg, #212529) !important;
    border-color: var(--mdb-dark-border-color, #495057) !important;
}

[data-mdb-theme="dark"] .popover.popover-help-wide .popover-body {
    color: var(--mdb-dark-color, #dee2e6) !important;
}

