:root{
  --xc-bg: rgba(245, 241, 235, 0.72);
  --xc-surface: rgba(255, 252, 247, 0.78);
  --xc-surface-strong: rgba(255, 250, 243, 0.92);
  --xc-line: rgba(91, 79, 68, 0.12);
  --xc-line-strong: rgba(91, 79, 68, 0.22);
  --xc-text: #241f1a;
  --xc-muted: #6c6258;
  --xc-bone: #f6f1ea;
  --xc-ash: #d9d1c7;
  --xc-shadow: 0 24px 80px rgba(38, 28, 20, 0.16);
  --xc-radius-xl: 28px;
  --xc-radius-lg: 22px;
  --xc-radius-md: 16px;
  --xc-transition: 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

html.xc-lock,
body.xc-lock{
  overflow: hidden;
  touch-action: none;
}

body.xc-lock{
  position: fixed;
  width: 100%;
  left: 0;
  right: 0;
}

.xc-open-quote-modal,
.open-quote-modal,
[data-open-quote-modal]{
  -webkit-tap-highlight-color: transparent;
}

.xc-modal-overlay{
  position: fixed;
  inset: 0;
  z-index: 9999;
  background:
    linear-gradient(to bottom, rgba(248,244,239,0.36), rgba(233,226,217,0.46)),
    rgba(25, 22, 18, 0.34);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--xc-transition), visibility var(--xc-transition);
}

.xc-modal-overlay.is-active{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.xc-modal-shell{
  position: relative;
  width: min(980px, 100%);
  max-height: min(92vh, 980px);
  overflow: auto;
  border-radius: var(--xc-radius-xl);
  background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(248,242,235,0.78));
  border: 1px solid rgba(255,255,255,0.46);
  box-shadow: var(--xc-shadow);
  padding: 34px 30px 26px;
  transform: translateY(30px) scale(0.985);
  opacity: 0;
  transition: transform var(--xc-transition), opacity var(--xc-transition);
  -webkit-overflow-scrolling: touch;
}

.xc-modal-overlay.is-active .xc-modal-shell{
  transform: translateY(0) scale(1);
  opacity: 1;
}

.xc-modal-shell::-webkit-scrollbar{
  width: 8px;
}
.xc-modal-shell::-webkit-scrollbar-thumb{
  background: rgba(60, 50, 42, 0.15);
  border-radius: 999px;
}

.xc-modal-close{
  position: sticky;
  top: 0;
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(36,31,26,0.08);
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  color: var(--xc-text);
  box-shadow: 0 8px 24px rgba(22, 18, 15, 0.08);
  z-index: 3;
}

.xc-modal-close span{
  font-size: 1.55rem;
  line-height: 1;
}

.xc-modal-close:focus-visible,
.xc-field input:focus-visible,
.xc-field select:focus-visible,
.xc-field textarea:focus-visible,
.xc-submit-btn:focus-visible{
  outline: 2px solid rgba(85, 71, 58, 0.5);
  outline-offset: 2px;
}

.xc-modal-head{
  padding-top: 6px;
  margin-bottom: 28px;
}

.xc-modal-kicker{
  margin: 0 0 10px;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--xc-muted);
}

.xc-modal-head h2{
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 0.96;
  letter-spacing: -0.03em;
  color: var(--xc-text);
  font-weight: 500;
}

.xc-modal-subtitle{
  margin: 14px 0 0;
  max-width: 720px;
  color: var(--xc-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.xc-quote-form{
  display: block;
}

.xc-form-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.xc-col-2{
  grid-column: span 2;
}

.xc-field{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.xc-field label{
  font-size: 0.9rem;
  color: var(--xc-text);
  letter-spacing: 0.01em;
}

.xc-field input,
.xc-field select,
.xc-field textarea{
  width: 100%;
  border: 1px solid var(--xc-line);
  background: rgba(255, 252, 247, 0.86);
  color: var(--xc-text);
  border-radius: 16px;
  padding: 15px 16px;
  font-size: 0.98rem;
  outline: none;
  transition: border-color var(--xc-transition), box-shadow var(--xc-transition), background var(--xc-transition), transform var(--xc-transition);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.42);
  -webkit-appearance: none;
  appearance: none;
}

.xc-field textarea{
  resize: vertical;
  min-height: 120px;
}

.xc-field input:focus,
.xc-field select:focus,
.xc-field textarea:focus{
  border-color: rgba(85, 71, 58, 0.34);
  background: rgba(255,255,255,0.96);
  box-shadow: 0 0 0 5px rgba(228, 217, 205, 0.46);
}

.xc-error{
  min-height: 18px;
  color: #9b4d3b;
  font-size: 0.78rem;
  line-height: 1.4;
}

.xc-pill-group{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.xc-pill{
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.xc-pill input{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.xc-pill span{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(75, 64, 53, 0.12);
  background: rgba(255,255,255,0.58);
  color: var(--xc-text);
  font-size: 0.9rem;
  transition: transform var(--xc-transition), border-color var(--xc-transition), background var(--xc-transition), box-shadow var(--xc-transition);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.xc-pill:hover span{
  transform: translateY(-1px);
  border-color: rgba(75, 64, 53, 0.22);
}

.xc-pill input:checked + span{
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(239,232,224,0.92));
  border-color: rgba(75, 64, 53, 0.28);
  box-shadow: 0 10px 25px rgba(28, 24, 20, 0.08);
}

.xc-submit-btn{
  appearance: none;
  border: none;
  outline: none;
  border-radius: 999px;
  min-height: 54px;
  padding: 0 22px;
  background: linear-gradient(180deg, #1f1a16, #2c251f);
  color: #f7f2eb;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: fit-content;
  box-shadow: 0 18px 36px rgba(29, 24, 19, 0.18);
  transition: transform var(--xc-transition), box-shadow var(--xc-transition), opacity var(--xc-transition);
  -webkit-tap-highlight-color: transparent;
}

.xc-submit-btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 24px 44px rgba(29, 24, 19, 0.22);
}

.xc-submit-btn.is-loading{
  pointer-events: none;
  opacity: 0.84;
}

.xc-btn-loader{
  display: none;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(247,242,235,0.28);
  border-top-color: rgba(247,242,235,0.94);
  animation: xc-spin 0.8s linear infinite;
}

.xc-submit-btn.is-loading .xc-btn-loader{
  display: inline-block;
}

@keyframes xc-spin{
  to{ transform: rotate(360deg); }
}

.xc-toast-wrap{
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10050;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.xc-toast{
  min-width: 280px;
  max-width: 420px;
  border-radius: 18px;
  padding: 14px 16px;
  color: #241f1a;
  background: rgba(255,250,243,0.96);
  border: 1px solid rgba(70,60,50,0.10);
  box-shadow: 0 18px 40px rgba(29,24,19,0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform: translateY(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, transform .35s ease, visibility .35s ease;
  font-size: 14px;
  line-height: 1.5;
}

.xc-toast.is-show{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.xc-toast-success{
  border-color: rgba(80,105,74,0.18);
}
.xc-toast-error{
  border-color: rgba(155,77,59,0.22);
}

@media (max-width: 820px){
  .xc-modal-overlay{
    padding: 10px;
    align-items: flex-end;
  }

  .xc-modal-shell{
    width: 100%;
    max-height: 92dvh;
    border-radius: 26px 26px 0 0;
    padding: 24px 18px 22px;
  }

  .xc-form-grid{
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .xc-col-2{
    grid-column: span 1;
  }

  .xc-modal-head h2{
    font-size: clamp(1.7rem, 8vw, 2.3rem);
  }

  .xc-modal-subtitle{
    font-size: 0.96rem;
  }

  .xc-submit-btn{
    width: 100%;
  }

  .xc-toast-wrap{
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .xc-toast{
    max-width: none;
    min-width: 0;
  }
}