:root {
  --qc-bg: #fbf9f6;
  --qc-bg-alt: #f3efe8;
  --qc-ink: #0f2336;
  --qc-ink-soft: #3d4e60;
  --qc-sea: #1b4a6b;
  --qc-sea-dark: #0d2d44;
  --qc-sand: #c9a36a;
  --qc-line: rgba(15, 35, 54, 0.12);
  --qc-line-strong: rgba(15, 35, 54, 0.22);
  --qc-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --qc-body: 'Inter', system-ui, -apple-system, sans-serif;
}

.qc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 27, 43, 0.55);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: qc-fade 0.2s ease;
}
.qc-overlay.is-open { display: flex; }

@keyframes qc-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.qc-modal {
  background: var(--qc-bg);
  border-radius: 22px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 36px 36px 32px;
  font-family: var(--qc-body);
  color: var(--qc-ink);
  box-shadow: 0 30px 80px rgba(7, 27, 43, 0.35);
  animation: qc-rise 0.25s cubic-bezier(.22,.61,.36,1);
}

@keyframes qc-rise {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.qc-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: 0;
  font-size: 24px;
  cursor: pointer;
  color: var(--qc-ink-soft);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: background 0.15s;
}
.qc-modal__close:hover { background: var(--qc-bg-alt); }

.qc-eyebrow {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--qc-sand);
  margin: 0 0 10px;
  font-weight: 500;
}

.qc-title {
  font-family: var(--qc-display);
  font-size: 34px;
  line-height: 1.1;
  margin: 0 0 22px;
  font-weight: 500;
}
.qc-title em { font-style: italic; color: var(--qc-sea); }

.qc-form {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.qc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.qc-field { display: flex; flex-direction: column; gap: 6px; }

.qc-field label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--qc-ink-soft);
  font-weight: 500;
}

.qc-field input,
.qc-field select {
  padding: 11px 12px;
  border: 1px solid var(--qc-line);
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: 15px;
  color: var(--qc-ink);
  transition: border-color 0.15s;
}
.qc-field input:focus,
.qc-field select:focus {
  outline: none;
  border-color: var(--qc-sea);
}

.qc-quote {
  background: var(--qc-bg-alt);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 20px;
}

.qc-quote__line {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--qc-ink-soft);
  margin-bottom: 8px;
}
.qc-quote__line:last-of-type { margin-bottom: 0; }

.qc-quote__line--total {
  border-top: 1px solid var(--qc-line);
  padding-top: 12px;
  margin-top: 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--qc-ink);
}

.qc-quote__deposit {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--qc-line);
  font-size: 14px;
  color: var(--qc-sea);
  font-weight: 500;
}

.qc-quote__empty {
  text-align: center;
  color: var(--qc-ink-soft);
  font-size: 14px;
  padding: 12px 0;
}

.qc-quote__error {
  color: #b3303a;
  font-size: 13px;
  text-align: center;
}

.qc-pay-choice {
  border: 0;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  gap: 8px;
}
.qc-pay-choice[hidden] { display: none; }
.qc-pay-choice legend {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--qc-ink-soft);
  font-weight: 500;
  padding: 0;
  margin-bottom: 6px;
}
.qc-pay-opt {
  display: grid;
  grid-template-columns: 18px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 12px;
  padding: 12px 14px;
  border: 1px solid var(--qc-line);
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s, background 0.15s;
}
.qc-pay-opt:has(input:checked) {
  border-color: var(--qc-sea);
  background: var(--qc-bg-alt);
}
.qc-pay-opt input {
  grid-row: 1 / span 2;
  margin: 0;
  accent-color: var(--qc-sea);
}
.qc-pay-opt__title {
  font-size: 14px;
  font-weight: 500;
  color: var(--qc-ink);
}
.qc-pay-opt__sub {
  font-size: 12px;
  color: var(--qc-ink-soft);
}

.qc-actions { display: grid; gap: 10px; }

.qc-btn {
  display: block;
  width: 100%;
  padding: 14px 20px;
  border-radius: 999px;
  border: 0;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: transform 0.15s, background 0.15s;
}
.qc-btn:hover:not(:disabled) { transform: translateY(-1px); }
.qc-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.qc-btn--primary {
  background: var(--qc-sea);
  color: #fff;
}
.qc-btn--primary:hover:not(:disabled) { background: var(--qc-sea-dark); }

.qc-btn--secondary {
  background: transparent;
  color: var(--qc-ink);
  border: 1px solid var(--qc-line-strong);
}
.qc-btn--secondary:hover:not(:disabled) { background: var(--qc-bg-alt); }

.qc-fineprint {
  font-size: 11px;
  color: var(--qc-ink-soft);
  text-align: center;
  margin: 14px 0 0;
  line-height: 1.5;
}

@media (max-width: 480px) {
  .qc-modal { padding: 28px 22px 24px; }
  .qc-title { font-size: 28px; }
  .qc-row { grid-template-columns: 1fr; }
}
