/* Annual leave calculation page styles. This file is isolated to the annual-leave tool. */

.annual-leave-form-stack {
  display: grid;
  gap: 1rem;
}

.annual-leave-field-group {
  min-width: 0;
  padding: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.55);
}

.annual-leave-choice-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.annual-leave-choice-option {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
  min-height: 74px;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.annual-leave-choice-option.is-selected {
  border-color: #4f46e5;
  background: #eef2ff;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.12);
}

.annual-leave-choice-option input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: #4f46e5;
  flex: 0 0 auto;
}

.annual-leave-choice-option strong,
.annual-leave-choice-option small {
  display: block;
}

.annual-leave-choice-option strong {
  color: #0f172a;
  font-weight: 800;
}

.annual-leave-choice-option small {
  margin-top: 0.18rem;
  color: #64748b;
}

.annual-leave-date-grid,
.annual-leave-secondary-grid {
  display: grid;
  gap: 1rem;
  align-items: start;
}

.annual-leave-date-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.annual-leave-secondary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.annual-leave-field-item {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}

.annual-leave-tool-form .field-label {
  display: block;
  min-height: 1.25rem;
  margin-bottom: 0.45rem;
}

.annual-leave-tool-form .field-input {
  width: 100%;
  height: 58px;
  min-height: 58px;
}

.annual-leave-helper-text {
  margin: 0.5rem 0 0;
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.45;
}

.annual-leave-helper-text--placeholder {
  visibility: hidden;
}

.annual-leave-switch-line {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 18px;
  padding: 0.9rem 1rem;
  background: #fff;
  color: #334155;
  cursor: pointer;
  margin: 0;
}

.annual-leave-switch-line input {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: #4f46e5;
}

.annual-leave-summary-shell {
  display: grid;
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
}

.annual-leave-summary-hero {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 1rem;
  padding: 1.2rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(248,250,252,0.98) 100%);
}

.annual-leave-summary-hero > div {
  min-width: 0;
}

.annual-leave-summary-hero-value {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.1;
  font-weight: 800;
  margin: 0.25rem 0 0.5rem;
  color: #0f172a;
}

.annual-leave-status-box {
    min-width: 220px !important;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.04);
}

.annual-leave-status-box small,
.annual-leave-summary-shell .result-card small {
  color: #64748b;
}

.annual-leave-status-box strong,
.annual-leave-summary-shell .result-card strong {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.08;
}

.annual-leave-status-box strong {
  font-size: 1.05rem;
  margin-top: 0.15rem;
  color: #0f172a;
}

.annual-leave-details-toggle {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: #fff;
  padding: 0.85rem 1rem;
}

.annual-leave-details-toggle > summary {
  cursor: pointer;
  font-weight: 700;
  color: #111827;
  list-style: none;
}

.annual-leave-details-toggle > summary::-webkit-details-marker {
  display: none;
}

.annual-leave-details-toggle > summary::marker {
  content: "";
}

.annual-leave-details-toggle > summary::after {
  content: "+";
  float: right;
  font-size: 1.1rem;
}

.annual-leave-details-toggle[open] > summary::after {
  content: "−";
}

.annual-leave-details-content {
  margin-top: 1rem !important;
}

.annual-leave-next-tier-note {
  border: 1px solid #fde68a;
  border-radius: 1rem;
  padding: 0.85rem 1rem;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.92rem;
  line-height: 1.5;
}

@media (max-width: 767.98px) {
  .annual-leave-field-group {
    padding: 0.9rem;
  }

  .annual-leave-choice-options,
  .annual-leave-date-grid,
  .annual-leave-secondary-grid,
  .annual-leave-summary-hero {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .annual-leave-status-box {
    min-width: 0 !important;
  }

  .annual-leave-helper-text--placeholder {
    display: none;
  }
}

.annual-leave-warning-note {
  margin-top: 1rem;
  border: 1px solid #fde68a;
  border-radius: 1rem;
  padding: 0.85rem 1rem;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.92rem;
  line-height: 1.5;
}

.annual-leave-warning-note:empty {
  display: none;
}

/* Informational helper cards are placed inside the grid so date and leave-day rows keep balanced proportions. */
.annual-leave-info-card {
  min-height: 58px;
  display: flex;
  align-items: center;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-left: 4px solid #ffd9b3;
  border-radius: 18px;
  background: #fff;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.45;
}

.annual-leave-date-info {
  grid-column: 1 / -1;
}

.annual-leave-used-info-card {
  grid-column: 1 / -1;
  order: 0;
}

.annual-leave-used-field-group .annual-leave-field-item {
  order: 1;
}

.annual-leave-tool-form.is-public .annual-leave-used-days-field {
  order: 1;
}

.annual-leave-tool-form.is-public .annual-leave-used-info-card {
  grid-column: auto;
  order: 2;
  align-self: end;
}

@media (max-width: 767.98px) {
  .annual-leave-date-info,
  .annual-leave-used-info-card,
  .annual-leave-tool-form.is-public .annual-leave-used-info-card {
    grid-column: 1 / -1;
  }
}
