/* PackFit.day - Carry-On Packing Volume Checker Styles */

:root {
  --c-navy: #1a2744;
  --c-navy-light: #243556;
  --c-teal: #2a9d8f;
  --c-teal-light: #3dbfb1;
  --c-amber: #e9c46a;
  --c-orange: #f4a261;
  --c-red: #e76f51;
  --c-green: #4caf50;
  --c-bg: #f7f5f0;
  --c-card: #ffffff;
  --c-text: #2c2c2c;
  --c-text-light: #5a5a6e;
  --c-border: #ddd8d0;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(26, 39, 68, 0.08);
  --shadow-lg: 0 8px 32px rgba(26, 39, 68, 0.12);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--c-teal); text-decoration: none; }
a:hover, a:focus { color: var(--c-teal-light); text-decoration: underline; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; top: -100%; left: 16px; z-index: 100;
  background: var(--c-teal); color: #fff; padding: 8px 16px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus { top: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

/* Header */
.site-header {
  background: var(--c-navy);
  color: #fff;
  padding: 14px 0;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  color: #fff; font-weight: 700; font-size: 1.25rem;
  text-decoration: none;
}
.logo:hover, .logo:focus { color: var(--c-teal-light); text-decoration: none; }
.logo-icon { width: 28px; height: 28px; color: var(--c-teal); }
.logo-dot { color: var(--c-teal); }

.site-nav {
  display: flex; gap: 20px; align-items: center;
}
.site-nav a {
  color: rgba(255,255,255,0.8); font-size: 0.9rem; font-weight: 500;
}
.site-nav a:hover, .site-nav a:focus { color: #fff; text-decoration: underline; }

/* Hero */
.hero-section {
  padding: 48px 0 24px;
}
.hero-content h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--c-navy);
  line-height: 1.2;
  margin-bottom: 12px;
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--c-text-light);
  max-width: 600px;
}

/* Cards */
.card {
  background: var(--c-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--c-border);
}
.card h3 {
  font-size: 1.05rem;
  color: var(--c-navy);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--c-teal);
}

/* App Grid */
.checker-app {
  margin: 24px 0;
}
.app-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  align-items: start;
}
.col-setup {
  display: flex; flex-direction: column; gap: 20px;
  position: sticky; top: 72px;
}
.col-results {
  display: flex; flex-direction: column; gap: 20px;
}

/* Form Fields */
.field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--c-text-light);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.field-help {
  font-size: 0.82rem;
  color: var(--c-text-light);
  margin-top: 6px;
  line-height: 1.5;
}

.input-select, .input-text {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font);
  color: var(--c-text);
  background: #fff;
  transition: border-color var(--transition);
  margin-bottom: 14px;
  appearance: auto;
}
.input-select:focus, .input-text:focus {
  outline: none;
  border-color: var(--c-teal);
  box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.15);
}

.dimensions-fieldset {
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin: 14px 0;
}
.dimensions-fieldset legend {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--c-navy);
  padding: 0 6px;
}
.dim-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.dim-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--c-text-light);
  display: block;
  margin-bottom: 2px;
}
.dim-field input {
  margin-bottom: 0;
}

.bag-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  padding-top: 10px;
  border-top: 1px dashed var(--c-border);
}
.bag-total strong {
  color: var(--c-navy);
  font-size: 1.1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-primary {
  background: var(--c-teal);
  color: #fff;
  width: 100%;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--c-teal-light);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--c-navy);
  color: #fff;
}
.btn-secondary:hover, .btn-secondary:focus {
  background: var(--c-navy-light);
}
.btn-danger {
  background: var(--c-red);
  color: #fff;
}
.btn-danger:hover, .btn-danger:focus {
  background: #d35a3e;
}
.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.btn-row-actions .btn {
  flex: 1 1 120px;
}

/* Fill Bar */
.fill-display {
  margin: 16px 0 8px;
}
.fill-bar {
  width: 100%;
  height: 32px;
  background: #e8e4dc;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}
.fill-bar-inner {
  height: 100%;
  background: var(--c-green);
  border-radius: 16px;
  transition: width 0.4s ease, background 0.4s ease;
  min-width: 0;
}
.fill-bar-inner.caution { background: var(--c-amber); }
.fill-bar-inner.warning { background: var(--c-orange); }
.fill-bar-inner.danger { background: var(--c-red); }

.fill-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.9rem;
}
.fill-labels #fill-percent {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--c-navy);
}
.fill-warning {
  margin-top: 8px;
  padding: 10px 14px;
  background: #fff3e0;
  border-left: 4px solid var(--c-orange);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.88rem;
  color: #7a4a00;
}

/* Packing List */
.card-items-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--c-teal);
}
.card-items-header h3 {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.item-count {
  font-size: 0.82rem;
  color: var(--c-text-light);
  background: var(--c-bg);
  padding: 3px 10px;
  border-radius: 20px;
}

.packing-list {
  list-style: none;
  max-height: 360px;
  overflow-y: auto;
}
.packing-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--c-border);
  gap: 8px;
}
.packing-list li:last-child { border-bottom: none; }
.item-info {
  flex: 1;
  min-width: 0;
}
.item-info .item-name {
  font-weight: 600;
  font-size: 0.92rem;
  display: block;
}
.item-info .item-meta {
  font-size: 0.78rem;
  color: var(--c-text-light);
}
.item-vol {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--c-navy);
  white-space: nowrap;
}
.btn-remove {
  background: none;
  border: none;
  color: var(--c-red);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
}
.btn-remove:hover, .btn-remove:focus {
  background: #fce8e4;
}
.list-summary {
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  margin-top: 8px;
  border-top: 2px solid var(--c-border);
  font-size: 0.95rem;
}
.list-summary strong {
  color: var(--c-navy);
  font-size: 1.1rem;
}

/* Packing Order */
.packing-order { margin-top: 12px; }
.order-group {
  margin-bottom: 16px;
}
.order-group h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--c-navy);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.order-group h4 .zone-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.zone-bottom .zone-dot { background: var(--c-navy); }
.zone-middle .zone-dot { background: var(--c-teal); }
.zone-top .zone-dot { background: var(--c-amber); }
.zone-access .zone-dot { background: var(--c-orange); }

.order-group ul {
  list-style: none;
  padding-left: 18px;
}
.order-group li {
  font-size: 0.88rem;
  padding: 3px 0;
  color: var(--c-text-light);
  position: relative;
}
.order-group li::before {
  content: '·';
  position: absolute;
  left: -14px;
  color: var(--c-teal);
  font-weight: 700;
}

.empty-state {
  color: var(--c-text-light);
  font-size: 0.9rem;
  font-style: italic;
  padding: 8px 0;
}

/* Saved Trips */
.save-row { margin-bottom: 12px; }
.saved-trips-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.saved-trip-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  font-family: var(--font);
  width: 100%;
  text-align: left;
}
.saved-trip-btn:hover {
  border-color: var(--c-teal);
}
.saved-trip-btn .trip-date {
  font-size: 0.75rem;
  color: var(--c-text-light);
}
.saved-trip-btn .btn-del-trip {
  background: none;
  border: none;
  color: var(--c-red);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 4px;
}

/* Copy confirm */
.copy-confirm {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--c-green);
  font-weight: 600;
}

/* Info Section */
.info-section {
  margin: 48px 0 32px;
}
.info-section h2 {
  font-size: 1.6rem;
  color: var(--c-navy);
  margin-bottom: 24px;
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.info-block {
  background: var(--c-card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--c-border);
}
.info-block h3 {
  font-size: 1rem;
  color: var(--c-navy);
  margin-bottom: 8px;
}
.info-block p, .info-block ul {
  font-size: 0.9rem;
  color: var(--c-text-light);
  line-height: 1.6;
}
.info-block ul {
  padding-left: 18px;
  margin-top: 6px;
}
.info-block li { margin-bottom: 4px; }

/* FAQ */
.faq-section {
  margin: 32px 0 48px;
}
.faq-section h2 {
  font-size: 1.6rem;
  color: var(--c-navy);
  margin-bottom: 20px;
}
.faq-item {
  background: var(--c-card);
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-item summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--c-navy);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--c-teal);
  transition: transform var(--transition);
}
.faq-item[open] summary::after {
  content: '−';
}
.faq-item p {
  padding: 0 20px 16px;
  font-size: 0.9rem;
  color: var(--c-text-light);
  line-height: 1.6;
}

/* Footer */
.site-footer {
  background: var(--c-navy);
  color: rgba(255,255,255,0.7);
  padding: 32px 0;
  margin-top: auto;
  font-size: 0.85rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}
.footer-inner a { color: var(--c-teal-light); }
.footer-inner a:hover { color: #fff; }
.footer-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-note {
  font-size: 0.78rem;
  opacity: 0.6;
}

/* Print */
@media print {
  .site-header, .site-footer, .col-setup, .card-actions,
  .hero-section, .faq-section, .info-section { display: none; }
  .app-grid { display: block; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  body { background: #fff; }
}

/* Responsive */
@media (max-width: 900px) {
  .app-grid { grid-template-columns: 1fr; }
  .col-setup { position: static; }
}

@media (max-width: 600px) {
  .container { padding: 0 14px; }
  .hero-section { padding: 32px 0 16px; }
  .hero-content h1 { font-size: 1.6rem; }
  .card { padding: 16px; }
  .dim-row { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .btn-row-actions .btn { flex: 1 1 100%; }
  .site-nav { gap: 12px; }
  .site-nav a { font-size: 0.82rem; }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
