/* =========================================================
   EstiPro Global — Interactive & Dynamic Components Styles
   ========================================================= */

/* ---------- Bid Desk Nav Item ---------- */
.nav-link-biddesk {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  color: var(--navy) !important;
  font-weight: 700 !important;
  position: relative;
  transition: all 0.2s ease;
}
.nav-link-biddesk:hover {
  color: var(--blue-ink) !important;
}
.biddesk-badge {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(232,163,61, 0.16);
  color: var(--amber-dark);
  border: 1px solid rgba(232,163,61, 0.4);
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 800;
  line-height: 1.2;
}
.biddesk-ext-icon {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.7;
}

/* Mobile nav Bid Desk styling */
@media (max-width: 820px) {
  .nav-link-biddesk {
    display: flex !important;
    justify-content: space-between;
    background: var(--bg-soft);
    margin: 4px 0;
  }
}

/* ---------- Flash & Form Status Alerts ---------- */
.alert-banner {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 0.95rem;
  line-height: 1.5;
  box-shadow: var(--shadow-sm);
  animation: fadeInDown 0.3s ease-out;
}
.alert-banner.success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}
.alert-banner.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.alert-banner .alert-icon {
  width: 22px;
  height: 22px;
  flex: none;
  margin-top: 1px;
}
.alert-banner strong {
  display: block;
  font-weight: 700;
  margin-bottom: 2px;
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Interactive Calculator Section ---------- */
.calc-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 36px;
  margin: 40px auto;
  max-width: 860px;
}
.calc-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 36px;
  align-items: start;
}
@media (max-width: 768px) {
  .calc-card { padding: 24px; }
  .calc-grid { grid-template-columns: 1fr; gap: 28px; }
}

.calc-group {
  margin-bottom: 24px;
}
.calc-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
  font-size: 0.95rem;
}
.calc-label .val-display {
  color: var(--amber-dark);
  font-size: 1.15rem;
  font-weight: 800;
}

/* Selector chip buttons */
.calc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.calc-chip {
  padding: 8px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--slate);
  user-select: none;
}
.calc-chip:hover {
  background: #e8eff7;
  color: var(--navy);
  border-color: #cbd5e1;
}
.calc-chip.active {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
  box-shadow: 0 2px 8px rgba(16, 42, 67, 0.2);
}

/* Custom Range Slider */
.calc-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #e2e8f0;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--amber);
  border: 3px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  cursor: pointer;
  transition: transform 0.1s ease;
}
.calc-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: var(--amber-dark);
}

/* Trade checkboxes grid */
.trade-checkboxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 480px) {
  .trade-checkboxes { grid-template-columns: 1fr; }
}
.trade-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--navy);
  cursor: pointer;
  padding: 6px 10px;
  background: var(--bg-soft);
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}
.trade-check-label:hover {
  background: #f1f5f9;
}
.trade-check-label input:checked + span {
  font-weight: 700;
  color: var(--amber-dark);
}

/* Output result box */
.calc-result {
  background: linear-gradient(135deg, var(--navy-deep), var(--navy));
  color: #ffffff;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.calc-result .res-title {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #F3D9A8;
  font-weight: 700;
  margin-bottom: 12px;
}
.calc-result .price-range {
  font-size: 2.2rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.1;
}
.calc-result .price-sub {
  font-size: 0.88rem;
  color: #aebccc;
  margin-bottom: 20px;
}
.calc-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 20px;
  text-align: left;
}
.calc-metric .m-lab {
  font-size: 0.75rem;
  color: #94a3b8;
  text-transform: uppercase;
}
.calc-metric .m-val {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
}
.calc-trust {
  font-size: 0.8rem;
  color: #c9d6e4;
  margin-top: 14px;
  line-height: 1.4;
}

/* ---------- Portfolio Filter Tabs ---------- */
.portfolio-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 0 auto 36px;
}
.p-filter-btn {
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--slate);
  cursor: pointer;
  transition: all 0.15s ease;
}
.p-filter-btn:hover {
  border-color: var(--navy);
  color: var(--navy);
}
.p-filter-btn.active {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
  box-shadow: 0 4px 12px rgba(16, 42, 67, 0.15);
}
.sample-card.is-hidden {
  display: none !important;
}

/* ---------- Drag-and-Drop Plan Upload Area ---------- */
.plan-dropzone {
  border: 2px dashed var(--line);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  background: var(--bg-soft);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  margin-bottom: 12px;
}
.plan-dropzone:hover,
.plan-dropzone.dragover {
  border-color: var(--blue);
  background: var(--blue-soft);
}
.plan-dropzone input[type="file"] {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
}
.dropzone-icon {
  width: 36px;
  height: 36px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 1.8;
  margin: 0 auto 8px;
  display: block;
}
.dropzone-title {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.dropzone-sub {
  font-size: 0.82rem;
  color: var(--slate-light);
}
.dropzone-filename {
  display: none;
  margin-top: 10px;
  padding: 6px 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--navy);
  font-weight: 600;
}
.dropzone-filename.has-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ---------- Native Accessible Modal (<dialog>) ---------- */
dialog.quick-quote-modal {
  border: none;
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  max-width: 580px;
  width: 92%;
  margin: auto;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #ffffff;
  overflow: hidden;
}
dialog.quick-quote-modal::backdrop {
  background: rgba(10, 31, 51, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal-header {
  background: var(--navy);
  color: #ffffff;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 {
  color: #ffffff;
  margin: 0;
  font-size: 1.25rem;
}
.modal-close-btn {
  background: transparent;
  border: none;
  color: #c9d6e4;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}
.modal-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}
.modal-body {
  padding: 24px;
  max-height: 80vh;
  overflow-y: auto;
}

/* ---------- Floating Quick Action Button ---------- */
.floating-quote-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 45;
  background: var(--blue);
  color: #ffffff;
  padding: 13px 20px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.92rem;
  box-shadow: 0 8px 24px rgba(31,95,209, 0.40);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: 2px solid #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.floating-quote-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(31,95,209, 0.50);
  text-decoration: none;
  background: var(--blue-ink);
}
@media (max-width: 600px) {
  .floating-quote-btn {
    bottom: 16px;
    right: 16px;
    padding: 11px 16px;
    font-size: 0.85rem;
  }
}

/* FAQ Search input */
.faq-search-wrapper {
  max-width: 480px;
  margin: 0 auto 30px;
  position: relative;
}
.faq-search-input {
  width: 100%;
  padding: 12px 18px 12px 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.95rem;
  background: #ffffff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  outline: none;
}
.faq-search-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31,95,209, 0.2);
}
.faq-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  stroke: var(--slate-light);
  fill: none;
  pointer-events: none;
}
