/* ==========================================================================
   CALCOLO ORE LAVORATIVE SETTIMANALI - STILI DEDICATI
   Sito di riferimento: calcoloorelavorate.it
   Tutti gli stili sono strettamente incapsulati in .weekly-hours-calculator
   Compatibile al 100% con WordPress, Kadence Blocks e visualizzatori standalone.
   ========================================================================== */

.weekly-hours-calculator {
  /* Variabili del design system */
  --whc-bg: #F8FAFC;
  --whc-card: #FFFFFF;
  --whc-primary: #2563EB;
  --whc-primary-hover: #1D4ED8;
  --whc-primary-light: #EFF6FF;
  --whc-text: #0F172A;
  --whc-muted: #64748B;
  --whc-border: #E2E8F0;
  --whc-border-hover: #CBD5E1;
  --whc-success: #059669;
  --whc-success-light: #ECFDF5;
  --whc-warning: #D97706;
  --whc-warning-light: #FFFBEB;
  --whc-danger: #DC2626;
  --whc-danger-light: #FEF2F2;
  --whc-radius-sm: 6px;
  --whc-radius-md: 10px;
  --whc-radius-lg: 14px;
  --whc-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --whc-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --whc-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --whc-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  font-family: var(--whc-font-sans);
  color: var(--whc-text);
  background-color: var(--whc-bg);
  box-sizing: border-box;
  max-width: 1050px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
}

/* Reset selettivo per tutti gli elementi interni */
.weekly-hours-calculator *,
.weekly-hours-calculator *::before,
.weekly-hours-calculator *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Cifre tabulari per tutti i valori numerici e orari */
.weekly-hours-calculator .tabular-nums,
.weekly-hours-calculator .whc-value,
.weekly-hours-calculator .whc-row-total,
.weekly-hours-calculator .whc-chart-val,
.weekly-hours-calculator .whc-time-input,
.weekly-hours-calculator .whc-break-input {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* --------------------------------------------------------------------------
   Header compatto
   -------------------------------------------------------------------------- */
.weekly-hours-calculator .whc-header {
  text-align: center;
  margin-bottom: 24px;
  padding: 0 8px;
}

.weekly-hours-calculator .whc-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--whc-text);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 8px;
}

.weekly-hours-calculator .whc-subtitle {
  font-size: 15px;
  color: var(--whc-muted);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Selettore Settimana (Week Navigation Card)
   -------------------------------------------------------------------------- */
.weekly-hours-calculator .whc-nav-card {
  background: var(--whc-card);
  border: 1px solid var(--whc-border);
  border-radius: var(--whc-radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: var(--whc-shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.weekly-hours-calculator .whc-nav-group-left,
.weekly-hours-calculator .whc-nav-group-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.weekly-hours-calculator .whc-nav-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1 1 auto;
  min-width: 200px;
}

.weekly-hours-calculator .whc-current-week-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--whc-text);
  letter-spacing: -0.01em;
}

.weekly-hours-calculator .whc-week-subinfo {
  font-size: 12px;
  color: var(--whc-muted);
  margin-top: 2px;
}

.weekly-hours-calculator .whc-btn-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1px solid var(--whc-border);
  color: var(--whc-text);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--whc-radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 40px;
  white-space: nowrap;
}

.weekly-hours-calculator .whc-btn-nav:hover {
  background: var(--whc-primary-light);
  border-color: #BFDBFE;
  color: var(--whc-primary);
}

.weekly-hours-calculator .whc-btn-nav:focus-visible {
  outline: 2px solid var(--whc-primary);
  outline-offset: 2px;
}

.weekly-hours-calculator .whc-date-picker-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.weekly-hours-calculator .whc-date-input {
  appearance: none;
  -webkit-appearance: none;
  background: #FFFFFF;
  border: 1px solid var(--whc-border);
  border-radius: var(--whc-radius-md);
  padding: 7px 10px;
  font-size: 13px;
  color: var(--whc-text);
  cursor: pointer;
  min-height: 40px;
  transition: border-color 0.15s ease;
}

.weekly-hours-calculator .whc-date-input:focus {
  outline: none;
  border-color: var(--whc-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.weekly-hours-calculator .whc-btn-today {
  background: var(--whc-primary-light);
  border: 1px solid #BFDBFE;
  color: var(--whc-primary);
  font-weight: 600;
}

.weekly-hours-calculator .whc-btn-today:hover {
  background: #DBEAFE;
  color: var(--whc-primary-hover);
}

/* --------------------------------------------------------------------------
   Presets Rapidi (Schedule Presets)
   -------------------------------------------------------------------------- */
.weekly-hours-calculator .whc-presets-bar {
  background: var(--whc-card);
  border: 1px solid var(--whc-border);
  border-radius: var(--whc-radius-lg);
  padding: 12px 18px;
  margin-bottom: 20px;
  box-shadow: var(--whc-shadow-sm);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.weekly-hours-calculator .whc-presets-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--whc-muted);
  white-space: nowrap;
}

.weekly-hours-calculator .whc-preset-btn {
  background: #F1F5F9;
  border: 1px solid var(--whc-border);
  color: var(--whc-text);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--whc-radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.weekly-hours-calculator .whc-preset-btn:hover {
  background: var(--whc-primary-light);
  border-color: #BFDBFE;
  color: var(--whc-primary);
}

.weekly-hours-calculator .whc-preset-btn:focus-visible {
  outline: 2px solid var(--whc-primary);
  outline-offset: 1px;
}

/* --------------------------------------------------------------------------
   Tabella Orari Settimanali (Desktop Timesheet)
   -------------------------------------------------------------------------- */
.weekly-hours-calculator .whc-timesheet-card {
  background: var(--whc-card);
  border: 1px solid var(--whc-border);
  border-radius: var(--whc-radius-lg);
  overflow: hidden;
  box-shadow: var(--whc-shadow-md);
  margin-bottom: 24px;
}

.weekly-hours-calculator .whc-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.weekly-hours-calculator .whc-table thead {
  background: #F8FAFC;
  border-bottom: 1px solid var(--whc-border);
}

.weekly-hours-calculator .whc-table th {
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--whc-muted);
}

.weekly-hours-calculator .whc-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--whc-border);
  vertical-align: middle;
  font-size: 14px;
}

.weekly-hours-calculator .whc-row:last-child td {
  border-bottom: none;
}

.weekly-hours-calculator .whc-row {
  transition: background-color 0.15s ease;
}

.weekly-hours-calculator .whc-row:hover {
  background-color: #F8FAFC;
}

.weekly-hours-calculator .whc-row.whc-row-disabled {
  background-color: #F8FAFC;
  opacity: 0.72;
}

.weekly-hours-calculator .whc-row.whc-row-disabled:hover {
  background-color: #F1F5F9;
}

/* Colonna Giorno & Toggle */
.weekly-hours-calculator .whc-day-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 160px;
}

.weekly-hours-calculator .whc-day-info {
  display: flex;
  flex-direction: column;
}

.weekly-hours-calculator .whc-day-name {
  font-weight: 600;
  color: var(--whc-text);
  font-size: 14px;
}

.weekly-hours-calculator .whc-day-date {
  font-size: 12px;
  color: var(--whc-muted);
}

/* Switch personalizzato accessibile */
.weekly-hours-calculator .whc-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.weekly-hours-calculator .whc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.weekly-hours-calculator .whc-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #CBD5E1;
  transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 22px;
}

.weekly-hours-calculator .whc-slider::before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.weekly-hours-calculator .whc-switch input:checked + .whc-slider {
  background-color: var(--whc-primary);
}

.weekly-hours-calculator .whc-switch input:focus-visible + .whc-slider {
  outline: 2px solid var(--whc-primary);
  outline-offset: 2px;
}

.weekly-hours-calculator .whc-switch input:checked + .whc-slider::before {
  transform: translateX(18px);
}

/* Input Orari e Pausa */
.weekly-hours-calculator .whc-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.weekly-hours-calculator .whc-time-input {
  width: 100%;
  max-width: 120px;
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid var(--whc-border);
  border-radius: var(--whc-radius-sm);
  background: #FFFFFF;
  color: var(--whc-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  min-height: 40px;
}

.weekly-hours-calculator .whc-time-input:disabled,
.weekly-hours-calculator .whc-break-input:disabled {
  background-color: #F1F5F9;
  color: #94A3B8;
  cursor: not-allowed;
  border-color: var(--whc-border);
}

.weekly-hours-calculator .whc-time-input:focus,
.weekly-hours-calculator .whc-break-input:focus {
  outline: none;
  border-color: var(--whc-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.weekly-hours-calculator .whc-break-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.weekly-hours-calculator .whc-break-input {
  width: 75px;
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid var(--whc-border);
  border-radius: var(--whc-radius-sm);
  background: #FFFFFF;
  color: var(--whc-text);
  text-align: right;
  min-height: 40px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.weekly-hours-calculator .whc-break-unit {
  font-size: 13px;
  color: var(--whc-muted);
}

/* Totale di riga */
.weekly-hours-calculator .whc-row-total-wrap {
  display: flex;
  flex-direction: column;
}

.weekly-hours-calculator .whc-row-total {
  font-weight: 700;
  font-size: 15px;
  color: var(--whc-text);
}

.weekly-hours-calculator .whc-row-decimal {
  font-size: 12px;
  color: var(--whc-muted);
}

.weekly-hours-calculator .whc-badge-night {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: #1E40AF;
  background: #DBEAFE;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 4px;
  width: fit-content;
}

.weekly-hours-calculator .whc-row-error {
  display: block;
  font-size: 11px;
  color: var(--whc-danger);
  font-weight: 500;
  margin-top: 3px;
}

/* Pulsante Azione Copia Singola Riga */
.weekly-hours-calculator .whc-btn-copy-day {
  background: transparent;
  border: 1px solid var(--whc-border);
  color: var(--whc-muted);
  border-radius: var(--whc-radius-sm);
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.weekly-hours-calculator .whc-btn-copy-day:hover {
  background: var(--whc-primary-light);
  border-color: #BFDBFE;
  color: var(--whc-primary);
}

.weekly-hours-calculator .whc-btn-copy-day:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: transparent;
}

/* --------------------------------------------------------------------------
   Dashboard di Riepilogo (Summary Dashboard)
   -------------------------------------------------------------------------- */
.weekly-hours-calculator .whc-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.weekly-hours-calculator .whc-card-stat {
  background: var(--whc-card);
  border: 1px solid var(--whc-border);
  border-radius: var(--whc-radius-lg);
  padding: 18px 20px;
  box-shadow: var(--whc-shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.weekly-hours-calculator .whc-card-stat:hover {
  box-shadow: var(--whc-shadow-md);
}

.weekly-hours-calculator .whc-card-stat.whc-stat-primary {
  border-color: #BFDBFE;
  background: linear-gradient(180deg, #FFFFFF 0%, #F0F7FF 100%);
  grid-column: span 2;
}

@media (max-width: 640px) {
  .weekly-hours-calculator .whc-card-stat.whc-stat-primary {
    grid-column: span 1;
  }
}

.weekly-hours-calculator .whc-stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--whc-muted);
  margin-bottom: 6px;
}

.weekly-hours-calculator .whc-stat-primary .whc-stat-label {
  color: var(--whc-primary);
}

.weekly-hours-calculator .whc-stat-val {
  font-size: 26px;
  font-weight: 800;
  color: var(--whc-text);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.weekly-hours-calculator .whc-stat-primary .whc-stat-val {
  font-size: 32px;
  color: var(--whc-primary);
}

.weekly-hours-calculator .whc-stat-sub {
  font-size: 13px;
  color: var(--whc-muted);
  margin-top: 6px;
}

/* --------------------------------------------------------------------------
   Confronto Target (Weekly Target Comparison)
   -------------------------------------------------------------------------- */
.weekly-hours-calculator .whc-target-card {
  background: var(--whc-card);
  border: 1px solid var(--whc-border);
  border-radius: var(--whc-radius-lg);
  padding: 18px 20px;
  margin-bottom: 24px;
  box-shadow: var(--whc-shadow-sm);
}

.weekly-hours-calculator .whc-target-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.weekly-hours-calculator .whc-target-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.weekly-hours-calculator .whc-target-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--whc-text);
}

.weekly-hours-calculator .whc-target-toggle-btn {
  background: none;
  border: none;
  font-size: 13px;
  color: var(--whc-primary);
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
}

.weekly-hours-calculator .whc-target-body {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--whc-border);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.weekly-hours-calculator .whc-target-input-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.weekly-hours-calculator .whc-target-input-label {
  font-size: 14px;
  color: var(--whc-text);
  font-weight: 500;
}

.weekly-hours-calculator .whc-target-input {
  width: 90px;
  padding: 7px 10px;
  font-size: 14px;
  border: 1px solid var(--whc-border);
  border-radius: var(--whc-radius-sm);
  background: #FFFFFF;
  color: var(--whc-text);
  font-weight: 600;
}

.weekly-hours-calculator .whc-target-result-banner {
  padding: 12px 16px;
  border-radius: var(--whc-radius-md);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.4;
}

.weekly-hours-calculator .whc-target-result-banner.whc-match {
  background: var(--whc-success-light);
  border: 1px solid #A7F3D0;
  color: #065F46;
}

.weekly-hours-calculator .whc-target-result-banner.whc-above {
  background: var(--whc-primary-light);
  border: 1px solid #BFDBFE;
  color: #1E40AF;
}

.weekly-hours-calculator .whc-target-result-banner.whc-below {
  background: var(--whc-warning-light);
  border: 1px solid #FDE68A;
  color: #92400E;
}

.weekly-hours-calculator .whc-target-disclaimer {
  font-size: 12px;
  color: var(--whc-muted);
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Grafico a Barre Settimanale (Inline SVG / CSS Bar Chart)
   -------------------------------------------------------------------------- */
.weekly-hours-calculator .whc-chart-card {
  background: var(--whc-card);
  border: 1px solid var(--whc-border);
  border-radius: var(--whc-radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--whc-shadow-sm);
  overflow-x: hidden;
}

.weekly-hours-calculator .whc-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.weekly-hours-calculator .whc-chart-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--whc-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.weekly-hours-calculator .whc-chart-legend {
  font-size: 12px;
  color: var(--whc-muted);
}

.weekly-hours-calculator .whc-chart-container {
  height: 170px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 10px 0 0;
  border-bottom: 1px solid var(--whc-border);
  position: relative;
  width: 100%;
}

.weekly-hours-calculator .whc-chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  min-width: 0;
}

.weekly-hours-calculator .whc-chart-val {
  font-size: 10px;
  font-weight: 600;
  color: var(--whc-text);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.weekly-hours-calculator .whc-chart-bar-wrap {
  width: 100%;
  max-width: 36px;
  height: 120px;
  background: #F1F5F9;
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.weekly-hours-calculator .whc-chart-bar-fill {
  width: 100%;
  background: var(--whc-primary);
  border-radius: 6px 6px 0 0;
  transition: height 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
  min-height: 0;
}

.weekly-hours-calculator .whc-chart-bar-fill.whc-inactive-bar {
  background: #CBD5E1;
}

.weekly-hours-calculator .whc-chart-labels-row {
  display: flex;
  gap: 6px;
  padding-top: 8px;
  width: 100%;
}

.weekly-hours-calculator .whc-chart-day-label {
  flex: 1;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--whc-text);
  min-width: 0;
  overflow: hidden;
}

.weekly-hours-calculator .whc-chart-day-sub {
  font-size: 9px;
  color: var(--whc-muted);
  display: block;
}

/* --------------------------------------------------------------------------
   Barra dei Pulsanti di Azione Funzionali
   -------------------------------------------------------------------------- */
.weekly-hours-calculator .whc-actions-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.weekly-hours-calculator .whc-btn-calc {
  background: var(--whc-primary);
  color: #FFFFFF;
  border: none;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--whc-radius-md);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
  transition: all 0.15s ease;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.weekly-hours-calculator .whc-btn-calc:hover {
  background: var(--whc-primary-hover);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.weekly-hours-calculator .whc-btn-calc:active {
  transform: translateY(0);
}

.weekly-hours-calculator .whc-btn-action {
  background: #FFFFFF;
  border: 1px solid var(--whc-border);
  color: var(--whc-text);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--whc-radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.weekly-hours-calculator .whc-btn-action:hover {
  background: #F8FAFC;
  border-color: var(--whc-border-hover);
  color: var(--whc-text);
}

.weekly-hours-calculator .whc-btn-action:focus-visible {
  outline: 2px solid var(--whc-primary);
  outline-offset: 2px;
}

.weekly-hours-calculator .whc-btn-danger:hover {
  background: var(--whc-danger-light);
  border-color: #FECACA;
  color: var(--whc-danger);
}

/* Note informative inferiori */
.weekly-hours-calculator .whc-footer-notice {
  font-size: 12px;
  color: var(--whc-muted);
  text-align: center;
  line-height: 1.6;
  margin-top: 10px;
}

/* --------------------------------------------------------------------------
   Notifica Toast (Feedback Copia, Salvataggio, ecc.)
   -------------------------------------------------------------------------- */
.weekly-hours-calculator .whc-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0F172A;
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: var(--whc-radius-md);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--whc-shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 9999;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.weekly-hours-calculator .whc-toast.whc-show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* --------------------------------------------------------------------------
   Modal / Dialogs di Conferma
   -------------------------------------------------------------------------- */
.weekly-hours-calculator .whc-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.weekly-hours-calculator .whc-modal-overlay.whc-open {
  opacity: 1;
  pointer-events: auto;
}

.weekly-hours-calculator .whc-modal-box {
  background: #FFFFFF;
  border-radius: var(--whc-radius-lg);
  max-width: 440px;
  width: 100%;
  padding: 24px;
  box-shadow: var(--whc-shadow-lg);
  transform: scale(0.96);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.weekly-hours-calculator .whc-modal-overlay.whc-open .whc-modal-box {
  transform: scale(1);
}

.weekly-hours-calculator .whc-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--whc-text);
  margin-bottom: 8px;
}

.weekly-hours-calculator .whc-modal-text {
  font-size: 14px;
  color: var(--whc-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.weekly-hours-calculator .whc-modal-options {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.weekly-hours-calculator .whc-modal-label-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}

.weekly-hours-calculator .whc-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* --------------------------------------------------------------------------
   Mobile Responsive Breakdown (< 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .weekly-hours-calculator {
    padding: 12px 10px 24px;
    max-width: 100%;
    overflow-x: hidden;
  }

  .weekly-hours-calculator .whc-title {
    font-size: 21px;
    line-height: 1.2;
  }

  .weekly-hours-calculator .whc-subtitle {
    font-size: 13px;
    padding: 0 4px;
  }

  .weekly-hours-calculator .whc-nav-card {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    gap: 10px;
  }

  .weekly-hours-calculator .whc-nav-group-left,
  .weekly-hours-calculator .whc-nav-group-right {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
  }

  .weekly-hours-calculator .whc-nav-group-left .whc-btn-nav,
  .weekly-hours-calculator .whc-nav-group-right .whc-btn-nav,
  .weekly-hours-calculator .whc-nav-group-right .whc-date-input,
  .weekly-hours-calculator .whc-nav-group-right .whc-btn-today {
    flex: 1;
    text-align: center;
    padding: 8px 6px;
    font-size: 12px;
    min-width: 0;
    justify-content: center;
  }

  .weekly-hours-calculator .whc-date-picker-wrap {
    flex: 1;
    display: flex;
  }

  .weekly-hours-calculator .whc-date-input {
    width: 100%;
  }

  .weekly-hours-calculator .whc-nav-center {
    width: 100%;
    min-width: 0;
  }

  .weekly-hours-calculator .whc-current-week-label {
    font-size: 15px;
    word-break: break-word;
  }

  .weekly-hours-calculator .whc-presets-bar {
    padding: 10px 12px;
    gap: 6px;
  }

  .weekly-hours-calculator .whc-presets-title {
    width: 100%;
    margin-bottom: 2px;
  }

  .weekly-hours-calculator .whc-preset-btn {
    flex: 1 1 calc(50% - 6px);
    text-align: center;
    padding: 8px 10px;
    font-size: 11px;
    white-space: normal;
  }

  /* Nascondi l'intestazione della tabella e trasforma le righe in card */
  .weekly-hours-calculator .whc-table thead {
    display: none;
  }

  .weekly-hours-calculator .whc-table,
  .weekly-hours-calculator .whc-table tbody,
  .weekly-hours-calculator .whc-table tr,
  .weekly-hours-calculator .whc-table td {
    display: block;
    width: 100%;
  }

  .weekly-hours-calculator .whc-row {
    padding: 14px 12px;
    border-bottom: 6px solid var(--whc-bg);
    background: #FFFFFF;
  }

  .weekly-hours-calculator .whc-table td {
    padding: 6px 0;
    border-bottom: none;
  }

  .weekly-hours-calculator .whc-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--whc-muted);
    margin-bottom: 4px;
  }

  .weekly-hours-calculator .whc-table td.whc-td-day::before,
  .weekly-hours-calculator .whc-table td.whc-td-actions::before {
    display: none;
  }

  .weekly-hours-calculator .whc-day-cell {
    justify-content: space-between;
    margin-bottom: 6px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--whc-border);
  }

  .weekly-hours-calculator .whc-input-wrap,
  .weekly-hours-calculator .whc-break-wrap {
    width: 100%;
  }

  .weekly-hours-calculator .whc-time-input {
    max-width: 100%;
    width: 100%;
  }

  .weekly-hours-calculator .whc-break-input {
    width: calc(100% - 35px);
  }

  .weekly-hours-calculator .whc-actions-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .weekly-hours-calculator .whc-btn-calc,
  .weekly-hours-calculator .whc-btn-action {
    width: 100%;
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   Stampa Ottimizzata (Print Stylesheet)
   -------------------------------------------------------------------------- */
@media print {
  body {
    background: #FFFFFF !important;
  }

  .weekly-hours-calculator {
    max-width: 100% !important;
    padding: 0 !important;
    background: #FFFFFF !important;
  }

  .weekly-hours-calculator .whc-nav-card .whc-btn-nav,
  .weekly-hours-calculator .whc-nav-card .whc-btn-today,
  .weekly-hours-calculator .whc-date-picker-wrap,
  .weekly-hours-calculator .whc-presets-bar,
  .weekly-hours-calculator .whc-actions-bar,
  .weekly-hours-calculator .whc-btn-copy-day,
  .weekly-hours-calculator .whc-target-toggle-btn,
  .weekly-hours-calculator .whc-switch,
  .weekly-hours-calculator .whc-footer-notice {
    display: none !important;
  }

  .weekly-hours-calculator .whc-table thead {
    display: table-header-group !important;
  }

  .weekly-hours-calculator .whc-table,
  .weekly-hours-calculator .whc-table tbody,
  .weekly-hours-calculator .whc-table tr {
    display: table !important;
    width: 100% !important;
  }

  .weekly-hours-calculator .whc-table td,
  .weekly-hours-calculator .whc-table th {
    display: table-cell !important;
    padding: 8px !important;
    border: 1px solid #CBD5E1 !important;
  }

  .weekly-hours-calculator .whc-card-stat,
  .weekly-hours-calculator .whc-timesheet-card,
  .weekly-hours-calculator .whc-target-card,
  .weekly-hours-calculator .whc-chart-card {
    box-shadow: none !important;
    border: 1px solid #CBD5E1 !important;
  }
}
