/* ==========================================================================
   GData.cz - Modern Wage & Payslip Calculator Styles
   Barevnost: Původní královská modrá (#1425b1), bílé a světle modré karty/písmo
   Optimalizováno pro přehlednost, intuitivní ovládání a mobily od 360px
   ========================================================================== */

.calc-wrapper {
  width: 100%;
  max-width: 100%;
  margin: 0 0 30px 0;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  grid-column: 1 / -1 !important;
}

.list-content > .calc-wrapper {
  grid-column: 1 / -1 !important;
  width: 100% !important;
}

.calc-header {
  background: #ffffff !important;
  border: 1px solid #bfdbfe !important;
  border-left: 5px solid #1425b1 !important;
  border-radius: 10px !important;
  padding: 18px 22px !important;
  margin-bottom: 22px !important;
  box-shadow: 0 4px 14px rgba(10, 20, 90, 0.08) !important;
}

.calc-header h1 {
  font-size: 1.65rem !important;
  font-weight: 800 !important;
  color: #1425b1 !important;
  margin: 0 0 8px 0 !important;
  line-height: 1.25 !important;
  text-shadow: none !important;
}

.calc-header p {
  color: #334155 !important;
  font-size: 0.96rem !important;
  margin: 0 !important;
  line-height: 1.5 !important;
  text-shadow: none !important;
}

/* Hlavní dvousloupcový layout (na mobilu pod sebou) */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  width: 100%;
}

@media (max-width: 900px) {
  .calc-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ==========================================================================
   Levý sloupec: Formulář a parametry výpočtu
   ========================================================================== */

.calc-card {
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 14px rgba(10, 20, 90, 0.12);
  margin-bottom: 16px;
}

.calc-card:last-child {
  margin-bottom: 0;
}

.calc-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1425b1;
  margin: 0 0 14px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.calc-card-title i {
  color: #1425b1;
}

/* Segmentované přepínače (Pills) pro typ poměru a mzdy */
.calc-segmented {
  display: flex;
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 16px;
  width: 100%;
}

.calc-segmented-item {
  flex: 1;
  text-align: center;
}

.calc-segmented-item input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.calc-segmented-item label {
  display: block;
  padding: 10px 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: #1e3a8a;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.calc-segmented-item input[type="radio"]:checked + label {
  background: #1425b1;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(20, 37, 177, 0.25);
}

.calc-segmented-item input[type="radio"]:focus-visible + label {
  outline: 2px solid #38bdf8;
}

/* Částka mzdy */
.calc-input-group {
  margin-bottom: 16px;
}

.calc-input-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 6px;
}

.calc-input-addon {
  position: relative;
  display: flex;
  align-items: center;
}

.calc-input-addon input[type="number"],
.calc-input-addon input[type="text"] {
  width: 100% !important;
  padding: 12px 50px 12px 14px !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  background: #ffffff !important;
  border: 2px solid #bfdbfe !important;
  border-radius: 8px !important;
  text-align: left !important;
  margin: 0 !important;
  min-height: 48px;
  box-sizing: border-box !important;
}

.calc-input-addon input:focus {
  outline: none !important;
  border-color: #1425b1 !important;
  box-shadow: 0 0 0 3px rgba(20, 37, 177, 0.18) !important;
}

.calc-addon-unit {
  position: absolute;
  right: 16px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1425b1;
  pointer-events: none;
}

/* Rychlé předvolby částek */
.calc-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.calc-preset-btn {
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  color: #1425b1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.calc-preset-btn:hover {
  background: #1425b1;
  border-color: #1425b1;
  color: #ffffff;
}

/* Rozvržení úvazku (2 sloupce vedle sebe) */
.calc-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 500px) {
  .calc-row-2 {
    grid-template-columns: 1fr;
  }
}

.calc-input-sm {
  width: 100% !important;
  padding: 10px 12px !important;
  font-size: 14px !important;
  border: 1px solid #bfdbfe !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  text-align: left !important;
  min-height: 42px;
  color: #0f172a !important;
  box-sizing: border-box !important;
}

.calc-input-sm:focus {
  outline: none !important;
  border-color: #1425b1 !important;
  box-shadow: 0 0 0 3px rgba(20, 37, 177, 0.18) !important;
}

/* Slevy a přepínače (Modern Switches / Checkboxes) */
.calc-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f0f7ff;
}

.calc-switch-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.calc-switch-label {
  font-size: 14px;
  font-weight: 500;
  color: #0f172a;
  cursor: pointer;
  flex: 1;
  padding-right: 12px;
}

.calc-switch-sub {
  display: block;
  font-size: 12px;
  color: #64748b;
  font-weight: normal;
}

/* Stylizovaný přepínač (Toggle Switch) */
.calc-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.calc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.calc-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .2s;
  border-radius: 24px;
}

.calc-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.calc-toggle input:checked + .calc-toggle-slider {
  background-color: #1425b1;
}

.calc-toggle input:checked + .calc-toggle-slider:before {
  transform: translateX(20px);
}

.calc-toggle input:disabled + .calc-toggle-slider {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Děti (pořadí slev a ZTP) */
.calc-kids-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.calc-kid-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 8px 12px;
}

.calc-kid-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calc-kid-left input[type="checkbox"],
.calc-kid-right input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  accent-color: #1425b1;
  cursor: pointer;
}

.calc-kid-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
}

.calc-kid-amount {
  font-size: 12px;
  color: #1425b1;
  font-weight: 700;
}

.calc-kid-right {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

/* Tlačítko Spočítat výplatu */
.calc-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #1425b1 0%, #1d33d8 100%) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 14px 20px !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(20, 37, 177, 0.35);
  transition: all 0.15s ease;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.calc-submit-btn:hover {
  background: linear-gradient(135deg, #101e91 0%, #1425b1 100%) !important;
  box-shadow: 0 6px 16px rgba(20, 37, 177, 0.45);
}

.calc-submit-btn:active {
  transform: translateY(1px);
}

/* ==========================================================================
   Pravý sloupec: Interaktivní Výplatní lístek (Výsledky)
   ========================================================================== */

.calc-result-panel {
  position: sticky;
  top: 20px;
}

@media (max-width: 900px) {
  .calc-result-panel {
    position: static;
  }
}

/* Hero karta Čistá mzda */
.calc-net-hero {
  background: linear-gradient(135deg, #1425b1 0%, #0d1b82 100%);
  color: #ffffff;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 10px 25px -5px rgba(10, 20, 90, 0.45);
  margin-bottom: 20px;
}

.calc-net-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #93c5fd;
  margin-bottom: 6px;
}

.calc-net-val {
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.calc-net-sub {
  font-size: 13px;
  color: #dbeafe;
  margin-top: 8px;
}

/* Detailní páska s rozpadem */
.calc-slip-card {
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 14px rgba(10, 20, 90, 0.12);
  margin-bottom: 16px;
}

.calc-slip-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1425b1;
  border-bottom: 2px solid #f0f7ff;
  padding-bottom: 10px;
  margin: 0 0 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.calc-slip-title span {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.calc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.calc-table tr td {
  padding: 9px 0;
  border-bottom: 1px solid #f1f5f9;
}

.calc-table tr:last-child td {
  border-bottom: none;
}

.calc-table .col-name {
  color: #334155;
}

.calc-table .col-rate {
  text-align: right;
  color: #64748b;
  font-size: 13px;
  padding-right: 12px;
}

.calc-table .col-val {
  text-align: right;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}

.calc-table .val-deduct {
  color: #dc2626;
}

.calc-table .val-bonus {
  color: #0284c7;
}

.calc-table .row-total td {
  border-top: 2px solid #1425b1;
  font-weight: 800;
  font-size: 15px;
  padding-top: 12px;
  color: #1425b1;
}

.calc-table .row-total .col-val {
  font-size: 1.2rem;
  color: #1425b1;
}

/* Karta nákladů firmy */
.calc-employer-card {
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 16px 20px;
}

.calc-employer-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1425b1;
  margin: 0 0 10px 0;
}

/* ==========================================================================
   Optimalizace pro 360px mobily
   ========================================================================== */

@media (max-width: 400px) {
  .calc-card,
  .calc-slip-card,
  .calc-employer-card {
    padding: 14px 12px !important;
  }

  .calc-net-val {
    font-size: 1.9rem !important;
  }

  .calc-segmented-item label {
    font-size: 12px !important;
    padding: 8px 4px !important;
  }

  .calc-table {
    font-size: 13px !important;
  }

  .calc-table .col-rate {
    display: none;
  }
}

/* ==========================================================================
   Nenápadná sekce pro úpravu legislativních parametrů (rozbalovací)
   ========================================================================== */

.calc-params-section {
  margin-top: 14px;
  margin-bottom: 6px;
  width: 100%;
}

.calc-params-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px dashed #94a3b8;
  color: #64748b;
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  text-decoration: none;
}

.calc-params-toggle-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #64748b;
}

.calc-params-toggle-btn i {
  font-size: 13px;
  color: #94a3b8;
  transition: transform 0.2s ease;
}

.calc-params-toggle-btn:hover i {
  color: #1425b1;
  transform: rotate(45deg);
}

.calc-params-drawer {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-left: 4px solid #3b82f6;
  border-radius: 8px;
  padding: 16px;
  margin-top: 10px;
  margin-bottom: 12px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.03);
}

.calc-params-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.calc-params-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.calc-params-tag {
  font-size: 10.5px;
  font-weight: 600;
  background: #dbeafe;
  color: #1e40af;
  padding: 2px 7px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.calc-params-sub {
  font-size: 11.5px;
  color: #64748b;
  margin: 0;
  width: 100%;
}

.calc-params-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px 14px;
  margin-bottom: 14px;
}

.calc-param-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.calc-param-label {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  line-height: 1.25;
}

.calc-param-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.calc-param-input {
  width: 100%;
  height: 32px;
  padding: 4px 34px 4px 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.calc-param-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.calc-param-unit {
  position: absolute;
  right: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  pointer-events: none;
}

.calc-params-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.calc-param-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.calc-param-reset-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.calc-params-note {
  font-size: 11px;
  color: #64748b;
  font-style: italic;
}

