/* ============================================
   Handy Skills For Hire — Quote Tool Styles
   ============================================ */

.quote-wrap {
  max-width: 1200px;
  margin: 2rem auto 4rem;
  padding: 0 1.25rem;
}

.quote-intro { margin-bottom: 1.5rem; }
.quote-intro h1 {
  font-family: 'DM Serif Display', serif;
  color: var(--navy);
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}
.quote-intro p {
  color: var(--text-light);
  font-size: 1.05rem;
  max-width: 65ch;
}

/* ─── Job Type Fieldset ─── */
.job-type-fieldset {
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem 1.5rem;
  margin-bottom: 2rem;
  background: #fff;
  box-shadow: 0 2px 12px rgba(212, 162, 78, 0.12);
}
.job-type-fieldset legend {
  font-family: 'DM Serif Display', serif;
  color: var(--navy);
  font-size: 1.15rem;
  padding: 0 0.5rem;
}
.job-type-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.5rem;
}
@media (max-width: 600px) {
  .job-type-options { grid-template-columns: 1fr; }
}

.job-type-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border: 2px solid var(--warm-gray);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--warm-white);
  position: relative;
}
.job-type-option:hover {
  border-color: var(--gold-light);
  background: #fff;
}
.job-type-option input[type="radio"] {
  position: absolute;
  opacity: 0;
}
.job-type-option:has(input:checked) {
  border-color: var(--navy);
  background: var(--gold-glow);
  box-shadow: 0 2px 8px rgba(15, 26, 46, 0.15);
}
.jt-title {
  font-weight: 700;
  color: var(--navy);
  font-size: 1.1rem;
}
.jt-sub {
  color: var(--text-light);
  font-size: 0.85rem;
  margin-top: 0.2rem;
}

/* ─── Two-column layout ─── */
.quote-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 900px) {
  .quote-grid { grid-template-columns: 1fr; }
  .quote-cart { position: static !important; }
}

.loading-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-light);
  font-style: italic;
}

/* ─── Categories ─── */
.quote-categories { min-height: 200px; }

.cat {
  background: #fff;
  border: 1px solid var(--warm-gray);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15, 26, 46, 0.04);
}
.cat-header {
  padding: 1rem 1.25rem;
  background: var(--navy);
  color: var(--gold);
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  transition: background 0.15s;
}
.cat-header:hover { background: var(--navy-deep); }
.cat-header::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
}
.cat.open .cat-header::after { content: '\2212'; }
.cat-body { padding: 0; display: none; }
.cat.open .cat-body { display: block; }

/* ─── Service rows ─── */
.svc {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--warm-gray);
  transition: background 0.1s;
}
.svc:last-child { border-bottom: none; }
.svc.active { background: var(--gold-glow); }

.svc-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
}
.svc-toggle {
  margin-top: 0.25rem;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--gold);
}
.svc-name {
  font-weight: 600;
  color: var(--navy);
  font-size: 1rem;
}
.svc-desc {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-top: 0.25rem;
  line-height: 1.4;
}

.svc-controls {
  margin-top: 0.75rem;
  margin-left: 1.65rem;
  display: none;
  gap: 0.85rem;
  flex-wrap: wrap;
  align-items: center;
}
.svc.active .svc-controls { display: flex; }

.svc-controls label {
  font-size: 0.85rem;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
}
.svc-controls input[type="number"],
.svc-controls select {
  padding: 0.4rem 0.6rem;
  border: 1px solid #c8c0b0;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  width: 90px;
  background: #fff;
}
.svc-controls select { width: auto; min-width: 120px; }
.svc-controls input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
  cursor: pointer;
}

.modifier-row {
  flex-basis: 100%;
  margin-top: 0.25rem;
}

/* ─── TV Crate Multi-Instance ─── */
.tv-instances {
  flex-basis: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.tv-instance {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid var(--warm-gray);
  border-radius: 6px;
}
.tv-instance label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
}
.tv-instance .remove-instance {
  margin-left: auto;
  background: transparent;
  border: 1px solid #c8c0b0;
  color: var(--text-light);
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
}
.tv-instance .remove-instance:hover {
  border-color: #b00020;
  color: #b00020;
}
.add-instance-btn {
  align-self: flex-start;
  background: var(--gold-glow);
  color: var(--navy);
  border: 1px dashed var(--gold);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
}
.add-instance-btn:hover {
  background: var(--gold);
  color: var(--navy-deep);
}

/* ─── Cart ─── */
.quote-cart {
  background: #fff;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky;
  top: 1rem;
  box-shadow: 0 4px 16px rgba(212, 162, 78, 0.15);
}
.cart-title {
  font-family: 'DM Serif Display', serif;
  color: var(--navy);
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
}
.cart-job-type {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--warm-gray);
  font-style: italic;
}
.cart-job-type.set {
  color: var(--navy);
  font-weight: 600;
  font-style: normal;
}
.cart-empty {
  color: var(--text-light);
  font-style: italic;
  padding: 0.5rem 0 1rem;
}
.cart-item {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--warm-gray);
  font-size: 0.92rem;
  color: var(--text);
}
.cart-item:last-of-type { border-bottom: none; }
.cart-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.cart-item-name {
  font-weight: 600;
  color: var(--navy);
}
.cart-item-detail {
  color: var(--text-light);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}
.cart-remove-btn {
  background: transparent;
  border: 1px solid var(--warm-gray);
  color: var(--text-light);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  flex-shrink: 0;
}
.cart-remove-btn:hover {
  border-color: #b00020;
  color: #b00020;
  background: #fdecea;
}

.destination-block {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 2px solid var(--warm-gray);
}
.destination-block label {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.destination-block input {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid #c8c0b0;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  box-sizing: border-box;
}
.destination-block input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

/* ─── Schedule block (date/time pickers) ─── */
.schedule-block {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--warm-gray);
}
.schedule-block label {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
}
.schedule-block .time-label { margin-top: 0.85rem; }
.schedule-block .opt {
  color: var(--text-light); font-weight: 400; font-size: 0.8rem;
}
.schedule-block input {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #c8c0b0;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  box-sizing: border-box;
}
.schedule-block input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

/* ─── Booking form section (inside modal) ─── */
.booking-form-section {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--gold);
  display: none;          /* shown by JS only when slot is bookable */
}
.booking-form-section.show { display: block; }
.booking-form-section h3 {
  font-family: 'DM Serif Display', serif;
  color: var(--navy);
  font-size: 1.3rem;
  margin: 0 0 1rem;
}
.booking-form-section label {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin: 0.85rem 0 0.4rem;
  font-size: 0.85rem;
}
.booking-form-section label:first-of-type { margin-top: 0; }
.booking-form-section .req { color: #b00020; }
.booking-form-section .opt {
  color: var(--text-light); font-weight: 400; font-size: 0.8rem;
}
.booking-form-section input,
.booking-form-section textarea {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #c8c0b0;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  box-sizing: border-box;
}
.booking-form-section textarea {
  resize: vertical;
  min-height: 60px;
}
.booking-form-section input:focus,
.booking-form-section textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

/* ─── Slot info banner inside modal ─── */
.slot-banner {
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  border: 2px solid var(--gold);
  background: var(--gold-glow);
}
.slot-banner.alternative {
  border-color: #d4a24e;
  background: #fff8e6;
}
.slot-banner.unavailable {
  border-color: #b00020;
  background: #fdecea;
}
.slot-banner-title {
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.4rem;
}
.slot-banner-detail {
  color: var(--text);
  font-size: 0.95rem;
}
.slot-banner-reason {
  color: var(--text-light);
  font-size: 0.85rem;
  margin-top: 0.4rem;
  font-style: italic;
}

.submit-btn {
  width: 100%;
  margin-top: 1rem;
  padding: 0.95rem;
  background: var(--navy);
  color: var(--gold);
  border: none;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  font-family: inherit;
}
.submit-btn:hover:not(:disabled) {
  background: var(--navy-deep);
  transform: translateY(-1px);
}
.submit-btn:active:not(:disabled) { transform: translateY(0); }
.submit-btn:disabled {
  background: #999;
  color: #ddd;
  cursor: not-allowed;
}

.err-msg {
  color: #b00020;
  background: #fdecea;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-top: 1rem;
  display: none;
  font-size: 0.9rem;
}
.err-msg.show { display: block; }

/* ─── Result modal ─── */
.result-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 26, 46, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
  backdrop-filter: blur(4px);
}
.result-overlay.show { display: flex; }

.result-card {
  background: #fff;
  border-radius: var(--radius);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.result-card h2 {
  font-family: 'DM Serif Display', serif;
  color: var(--navy);
  margin: 0 0 0.5rem;
  font-size: 1.8rem;
}
.result-job-type {
  color: var(--gold);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.result-line {
  display: flex;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--warm-gray);
  gap: 1rem;
}
.result-line.total {
  border-top: 2px solid var(--gold);
  border-bottom: none;
  margin-top: 0.5rem;
  padding-top: 1rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  font-family: 'DM Serif Display', serif;
}
.result-line .ri-name { font-weight: 600; color: var(--navy); }
.result-line .ri-amt { font-variant-numeric: tabular-nums; white-space: nowrap; }

.result-note {
  color: var(--text-light);
  font-size: 0.85rem;
  font-style: italic;
  margin-top: 0.25rem;
}
.result-disclaimers {
  background: var(--warm-gray);
  border-left: 4px solid var(--gold);
  padding: 0.85rem 1rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text);
  border-radius: 0 6px 6px 0;
}
.result-cta {
  margin-top: 1.25rem;
  padding: 1rem;
  background: var(--navy);
  color: var(--gold);
  border-radius: 8px;
  text-align: center;
  font-size: 0.95rem;
}
.result-cta a {
  color: var(--gold-light);
  font-weight: 700;
  text-decoration: none;
}
.result-cta a:hover { text-decoration: underline; }

.success-banner {
  margin-top: 1.5rem;
  padding: 2rem 1.5rem;
  background: linear-gradient(135deg, var(--gold-glow) 0%, #fff8e6 100%);
  border: 2px solid var(--gold);
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(212, 162, 78, 0.2);
}
.success-title {
  font-family: 'DM Serif Display', serif;
  font-size: 2.2rem;
  color: var(--navy);
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}
.success-slot {
  font-size: 1.05rem;
  color: var(--navy);
  font-weight: 600;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 6px;
  margin-bottom: 1rem;
  display: inline-block;
}
.success-msg {
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 1rem;
}
.success-msg strong {
  color: var(--navy);
}
.success-thanks {
  font-family: 'DM Serif Display', serif;
  color: var(--gold);
  font-size: 1.4rem;
  letter-spacing: 0.05em;
}

.close-btn {
  margin-top: 1.5rem;
  padding: 0.7rem 1.5rem;
  background: transparent;
  border: 2px solid var(--navy);
  color: var(--navy);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.close-btn:hover {
  background: var(--navy);
  color: var(--gold);
}

.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-light);
  font-size: 0.9rem;
  background: var(--warm-gray);
  margin-top: 4rem;
}
.site-footer a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
}
.site-footer a:hover { color: var(--gold); }

.quote-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 1rem;
  align-self: start;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

/* Override the original cart sticky — now the sidebar wrapper handles it */
.quote-cart {
  position: static !important;
  top: auto !important;
}

/* Calendar inside the sidebar inherits the cart's width */
.quote-availability .hs-cal-root {
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 1.25rem;
  box-sizing: border-box;
}

/* Mobile: stack normally, no sticky */
@media (max-width: 900px) {
  .quote-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }
}
