/* Calendar page styles — designed to work WITH the site's main.css + modern.css */

.calc-section { padding-top: 32px; padding-bottom: 64px; }

/* ── Page grid: sidebar (filter + tools) | calendar ── */
.kal-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  grid-template-rows: auto 1fr;
  gap: 24px;
}
.kal-grid-filter   { grid-column: 1; grid-row: 1; }
.kal-grid-tools    { grid-column: 1; grid-row: 2; }
.kal-grid-calendar { grid-column: 2; grid-row: 1 / -1; align-self: start; }

/* ── Filter bar ── */
.kal-filter-bar {
  background: #fff;
  border: 1px solid rgba(20,37,54,.08);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(20,37,54,.04);
  padding: 16px 20px;
}
.kal-filter-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.kal-filter-inner .kal-field { min-width: 0; }
.kal-filter-inner .kal-filter-btn { flex-shrink: 0; width: 100%; padding: 10px 24px; height: 40px; }

/* ── Card container ── */
.calc-card {
  background: #fff;
  border: 1px solid rgba(20,37,54,.08);
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(20,37,54,.055);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Sections ── */
.kal-section {
  border: 1px solid rgba(20,37,54,.08);
  border-radius: 10px;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Accordion toggle ── */
.kal-accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  color: #c7925b;
  text-transform: uppercase;
  letter-spacing: .05em;
  text-align: left;
  line-height: 1.3;
  transition: background .15s;
}
.kal-accordion-toggle:hover { background: rgba(199,146,91,.04); }

.kal-chevron {
  font-size: 14px;
  color: #c7925b;
  transition: transform .25s ease;
  flex-shrink: 0;
  margin-left: 10px;
}
.kal-accordion-toggle[aria-expanded="true"] .kal-chevron {
  transform: rotate(180deg);
}

/* ── Accordion body ── */
.kal-accordion-body {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px 16px;
}
.kal-accordion-toggle[aria-expanded="true"] + .kal-accordion-body {
  display: flex;
}

/* ── Fields ── */
.kal-field {
  display: flex;
  flex-direction: column;
}
.kal-field label {
  font-size: 11px;
  font-weight: 700;
  color: #647182;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── Inputs ── */
.calc-input {
  font-size: 14px;
  font-weight: 600;
  border: 1px solid rgba(20,37,54,.14);
  border-radius: 8px;
  padding: 10px 14px;
  background-color: #f9f8f5;
  color: #142536;
  height: 40px;
}
.calc-input:focus {
  border-color: #c7925b;
  box-shadow: 0 0 0 3px rgba(199,146,91,.14);
  background-color: #fff;
  outline: none;
}

/* ── Select with dropdown arrow ── */
.calc-select {
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(20,37,54,.14);
  border-radius: 8px;
  padding: 10px 36px 10px 14px;
  background-color: #f9f8f5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23142536' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  color: #142536;
  appearance: none;
  -webkit-appearance: none;
  height: 40px;
  cursor: pointer;
}
.calc-select:focus {
  border-color: #c7925b;
  box-shadow: 0 0 0 3px rgba(199,146,91,.14);
  outline: none;
}

/* ── Buttons ── */
.btn-calc-action {
  width: 100%;
  background: #c7925b;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: background .2s;
}
.btn-calc-action:hover { background: #b5834f; }

.btn-calc-secondary {
  width: 100%;
  background: #142536;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background .2s;
}
.btn-calc-secondary:hover { background: #1e3a52; }

/* ── Employment seniority grid ── */
.vj-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.vj-card {
  background: #f9f8f5;
  border: 1px solid rgba(20,37,54,.1);
  border-radius: 8px;
  padding: 10px 6px;
  text-align: center;
}
.vj-num {
  font-size: 20px;
  font-weight: 900;
  color: #c7925b;
}
.vj-text {
  font-size: 10px;
  font-weight: 800;
  color: #647182;
  text-transform: uppercase;
}

/* ── Calculated info box ── */
.calculated-info-box {
  background-color: rgba(16,185,129,.06);
  border: 1px dashed rgba(16,185,129,.4);
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  color: #10b981;
  font-weight: 700;
  line-height: 1.5;
}

/* ── Calendar grid ── */
.calendar-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.calendar-layout.single-month {
  grid-template-columns: 1fr;
  max-width: 420px;
  margin: 0 auto;
}

.calendar-item {
  background: #fff;
  border: 1px solid rgba(20,37,54,.08);
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 4px 12px rgba(20,37,54,.04);
}

.calendar-layout.single-month .calendar-item {
  padding: 24px;
}

.calendar-table {
  width: 100%;
  border-collapse: collapse;
}

.calendar-table th.month-name {
  color: #142536;
  padding-bottom: 10px;
  font-size: 14px;
  font-weight: 800;
  text-align: left;
  letter-spacing: .02em;
}

.calendar-layout.single-month .calendar-table th.month-name {
  font-size: 18px;
  padding-bottom: 14px;
}

.calendar-table th.day-title {
  color: #647182;
  font-size: 11px;
  font-weight: 700;
  padding-bottom: 8px;
  text-align: center;
  width: 14.28%;
}

.calendar-layout.single-month .calendar-table th.day-title {
  font-size: 13px;
  padding-bottom: 10px;
}

.calendar-table th.weekend-title {
  color: #dc3545;
}

.calendar-table td {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  height: 32px;
  color: #142536;
  position: relative;
}

.calendar-layout.single-month .calendar-table td {
  font-size: 16px;
  height: 42px;
}

.calendar-table td.blank {
  background-color: transparent;
}

.calendar-table td.weekend-cell {
  color: #dc3545;
  font-weight: 600;
}

.calendar-table td.holiday-cell {
  background-color: #fef3c7;
  font-weight: 700;
  color: #142536;
  border-radius: 6px;
  cursor: pointer;
}

.calendar-table td.replacement-cell {
  background-color: rgba(199,146,91,.1);
  font-weight: 700;
  color: #c7925b;
  border-radius: 6px;
  cursor: pointer;
}

.calendar-table td.holiday-cell:hover,
.calendar-table td.replacement-cell:hover {
  filter: brightness(0.94);
}

/* ── Modal ── */
.kal-modal-blur {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(20,37,54,.35);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.kal-modal-card {
  background: #fff;
  padding: 28px;
  border-radius: 14px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 20px 50px rgba(0,0,0,.15);
  border: 1px solid rgba(20,37,54,.08);
}

.kal-modal-caption {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 12px;
  color: #142536;
}

.kal-modal-info {
  line-height: 1.6;
  font-size: 14px;
  color: #4a5566;
  white-space: pre-line;
  margin-bottom: 20px;
  background: #f9f8f5;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(20,37,54,.08);
}

.kal-modal-action {
  text-align: right;
}
.kal-modal-action .btn-calc-action {
  width: auto;
  padding: 8px 24px;
}

/* ── Responsive ── */
@media (max-width: 991px) {
  .kal-grid { grid-template-columns: 1fr; }
  .kal-grid-filter   { grid-column: 1; grid-row: 1; }
  .kal-grid-calendar { grid-column: 1; grid-row: 2; }
  .kal-grid-tools    { grid-column: 1; grid-row: 3; }
  .kal-filter-inner { flex-direction: row; align-items: flex-end; }
  .kal-filter-inner .kal-field { flex: 1; }
  .kal-filter-inner .kal-filter-btn { width: auto; }
  .calendar-layout { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767px) {
  .calc-section { padding-top: 16px; padding-bottom: 40px; }
  .kal-grid { gap: 16px; }
  .kal-filter-bar { padding: 12px 14px; }
  .kal-filter-inner { flex-wrap: wrap; gap: 10px; }
  .kal-filter-inner .kal-field { flex: 1 1 calc(50% - 5px); min-width: 120px; }
  .kal-filter-inner .kal-filter-btn { width: 100%; }
  .calc-card { padding: 14px; gap: 10px; }
  .calendar-layout { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .calendar-layout.single-month { max-width: 320px; }
}
@media (max-width: 480px) {
  .calendar-layout { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .calendar-item { padding: 10px; }
  .calendar-table th.month-name { font-size: 12px; }
  .calendar-table th.day-title { font-size: 10px; }
  .calendar-table td { font-size: 12px; height: 28px; }
  .calendar-layout.single-month { max-width: 280px; }
  .calendar-layout.single-month .calendar-table td { font-size: 15px; height: 38px; }
}
