/* ── 8-Hour Shift Workday Calculator – Styles ───────────────────────────── */

.swc-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 880px;
  margin: 2rem auto;
  background: #f0fdf4;
  border: 1px solid #a7f3d0;
  border-radius: 18px;
  padding: clamp(1.25rem, 4vw, 2.25rem);
  box-shadow: 0 6px 32px rgba(16, 120, 80, 0.12);
  color: #1e293b;
  box-sizing: border-box;
}

/* ── Header ──────────────────────────────────────────────────────────────── */

.swc__header {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-bottom: 1.75rem;
}

.swc__logo { font-size: 2.4rem; line-height: 1; flex-shrink: 0; }

.swc__title {
  font-size: clamp(1.2rem, 3.5vw, 1.5rem);
  font-weight: 800;
  margin: 0 0 0.2rem;
  color: #064e3b;
}

.swc__desc {
  font-size: 0.9rem;
  color: #047857;
  margin: 0;
  line-height: 1.5;
}

/* ── Form grid ───────────────────────────────────────────────────────────── */

.swc__form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 580px) {
  .swc__form { grid-template-columns: 1fr; }
}

.swc__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.swc__field label {
  font-size: 0.83rem;
  font-weight: 700;
  color: #065f46;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.swc__field-icon { font-size: 1rem; }

.swc__input,
.swc__select {
  padding: 0.65rem 0.9rem;
  border: 1.5px solid #6ee7b7;
  border-radius: 9px;
  font-size: 0.98rem;
  color: #0f172a;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  box-sizing: border-box;
  appearance: auto;
}

.swc__input:focus,
.swc__select:focus {
  outline: none;
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.swc__field-hint {
  font-size: 0.75rem;
  color: #6b9e8a;
  margin-top: 0.1rem;
}

/* ── Calculate button ────────────────────────────────────────────────────── */

.swc__btn-calc {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
  margin-bottom: 1.75rem;
  letter-spacing: 0.01em;
}

.swc__btn-calc:hover  { filter: brightness(1.08); }
.swc__btn-calc:active { transform: scale(0.99); }

/* ── Results ─────────────────────────────────────────────────────────────── */

.swc__results { display: none; }
.swc__results.visible { display: block; }

/* ── Hero: start → end ───────────────────────────────────────────────────── */

.swc__hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: linear-gradient(135deg, #047857 0%, #059669 50%, #10b981 100%);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.swc__hero::before {
  content: '🕗';
  position: absolute;
  font-size: 9rem;
  opacity: 0.07;
  top: -1.5rem;
  right: -1rem;
  line-height: 1;
}

.swc__hero-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.swc__hero-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.75);
}

.swc__hero-time {
  font-size: clamp(2.2rem, 8vw, 3.5rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1;
}

.swc__hero-block--end .swc__hero-time { color: #d1fae5; }

.swc__hero-arrow {
  font-size: 2rem;
  color: rgba(255,255,255,0.55);
  font-weight: 300;
  flex-shrink: 0;
}

/* ── Stats row ───────────────────────────────────────────────────────────── */

.swc__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 580px) {
  .swc__stats { grid-template-columns: 1fr 1fr; }
}

.swc__stat-card {
  background: #d1fae5;
  border: 1.5px solid #a7f3d0;
  border-radius: 12px;
  padding: 1rem 0.85rem;
  text-align: center;
}

.swc__stat-icon { font-size: 1.4rem; margin-bottom: 0.3rem; }

.swc__stat-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: #065f46;
  line-height: 1.1;
}

.swc__stat-label {
  font-size: 0.77rem;
  color: #047857;
  font-weight: 600;
  margin-top: 0.2rem;
}

/* ── Section title ───────────────────────────────────────────────────────── */

.swc__section-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #064e3b;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 1.25rem 0 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ── Visual timeline bar ─────────────────────────────────────────────────── */

.swc__timeline-wrap {
  background: #d1fae5;
  border: 1.5px solid #a7f3d0;
  border-radius: 12px;
  padding: 1.1rem 1.1rem 0.9rem;
  margin-bottom: 0.25rem;
}

.swc__timeline-bar {
  display: flex;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  gap: 2px;
}

.swc__tl-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  border-radius: 6px;
  transition: width 0.4s ease;
}

.swc__tl-work   { background: #059669; }
.swc__tl-lunch  { background: #f59e0b; }
.swc__tl-break  { background: #6366f1; }

.swc__timeline-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  color: #065f46;
}

.swc__tl-legend {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.65rem;
}

.swc__tl-legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: #374151;
  font-weight: 600;
}

.swc__tl-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ── Schedule list ───────────────────────────────────────────────────────── */

.swc__schedule {
  background: #d1fae5;
  border: 1.5px solid #a7f3d0;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.swc__schedule-row {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #a7f3d0;
  gap: 0.85rem;
}

.swc__schedule-row:last-child { border-bottom: none; }
.swc__schedule-row:nth-child(even) { background: #ecfdf5; }

.swc__schedule-icon { font-size: 1.2rem; flex-shrink: 0; }

.swc__schedule-info { flex: 1; }

.swc__schedule-event {
  font-size: 0.92rem;
  font-weight: 700;
  color: #064e3b;
  line-height: 1.3;
}

.swc__schedule-detail {
  font-size: 0.78rem;
  color: #047857;
  margin-top: 0.1rem;
}

.swc__schedule-time {
  font-size: 1rem;
  font-weight: 800;
  color: #059669;
  white-space: nowrap;
}

/* ── Breakdown ───────────────────────────────────────────────────────────── */

.swc__breakdown {
  background: #d1fae5;
  border: 1.5px solid #a7f3d0;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.swc__breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #a7f3d0;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.swc__breakdown-row:last-child { border-bottom: none; }
.swc__breakdown-row:nth-child(even) { background: #ecfdf5; }

.swc__breakdown-factor {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  color: #064e3b;
  font-weight: 600;
}

.swc__breakdown-icon { font-size: 1.1rem; }

.swc__breakdown-amount {
  font-size: 0.97rem;
  font-weight: 800;
  color: #059669;
  white-space: nowrap;
}

/* ── Tips ────────────────────────────────────────────────────────────────── */

.swc__tips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-bottom: 0.25rem;
}

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

.swc__tip {
  background: #d1fae5;
  border: 1.5px solid #a7f3d0;
  border-radius: 10px;
  padding: 0.85rem 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.swc__tip-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 0.05rem; }

.swc__tip-text {
  font-size: 0.88rem;
  color: #064e3b;
  line-height: 1.55;
  font-weight: 500;
}

/* ── Info box ────────────────────────────────────────────────────────────── */

.swc__info {
  margin-top: 1.75rem;
  padding: 1.1rem 1.2rem;
  background: #d1fae5;
  border-radius: 10px;
  border-left: 4px solid #059669;
  font-size: 0.92rem;
  color: #064e3b;
  line-height: 1.75;
}

.swc__info strong { color: #0f172a; }

/* ── Error ───────────────────────────────────────────────────────────────── */

.swc__error {
  padding: 0.85rem 1rem;
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  border-radius: 10px;
  color: #dc2626;
  font-size: 0.93rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  display: none;
}

.swc__error.visible { display: block; }
