/* The "Submit to Gibraltar" panel and dialog (assets/submit.js). Self-contained, so
   it works on the forms (form.css), the contract (inline styles) and colors.html
   alike. Dashboard palette: navy #1f2f55, gold #c9a445. */

.gb-submit-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 26px 0 8px;
  padding: 18px 20px;
  border-radius: 10px;
  background: #1f2f55;
  color: #fff;
}

.gb-submit-panel h3 { margin: 0 0 4px; font: 400 17px/1.25 "Candal", "Arial Black", sans-serif; color: #fff; letter-spacing: 0; text-transform: none; }
.gb-submit-panel p { margin: 0; color: rgba(255, 255, 255, 0.78); font-size: 12.5px; line-height: 1.5; }
.gb-submit-panel .gb-submit-last { margin-top: 6px; color: #d9c9a8; font-weight: 700; }
.gb-submit-panel .gb-submit-last:empty { display: none; }

.gb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 700 14px/1.1 "Google Sans Flex", "Inter", -apple-system, "Segoe UI", Arial, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}

.gb-btn.primary { background: #1f2f55; color: #fff; }
.gb-btn.primary:hover { background: #172340; }
.gb-submit-panel .gb-btn.primary { background: #eee9d5; color: #1f2f55; }
.gb-submit-panel .gb-btn.primary:hover { background: #fff; }
.gb-btn.primary:disabled { opacity: 0.6; cursor: wait; }
.gb-btn.ghost { background: transparent; border-color: #e3dccb; color: #1f2f55; }
.gb-btn.ghost:hover { border-color: #1f2f55; }

dialog.gb-submit {
  width: min(560px, calc(100vw - 24px));
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #1e2330;
}

dialog.gb-submit::backdrop { background: rgba(17, 26, 48, 0.6); backdrop-filter: blur(2px); }

.gb-submit-card {
  position: relative;
  padding: 26px 26px 20px;
  border-top: 4px solid #c9a445;
  border-radius: 16px;
  background: #fff;
  font: 15px/1.5 "Google Sans Flex", "Inter", -apple-system, "Segoe UI", Arial, sans-serif;
}

.gb-submit-card h2 { margin: 2px 0 6px; color: #1f2f55; font: 400 26px/1.15 "Candal", "Arial Black", sans-serif; }
.gb-submit-kicker { margin: 0; color: #9a7b2c; font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.gb-submit-lede { margin: 0 0 16px; color: #6b6a66; }
.gb-submit-x { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f7f4ec; color: #1f2f55; font-size: 22px; line-height: 1; cursor: pointer; }

.gb-submit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.gb-submit-grid label { display: grid; gap: 5px; color: #6b6a66; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.gb-submit-grid label span { text-transform: none; letter-spacing: 0; font-weight: 500; }
.gb-submit-grid input, .gb-submit-grid select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e3dccb;
  border-radius: 10px;
  background: #fbfaf6;
  color: #1e2330;
  font: 500 15px/1.3 "Google Sans Flex", "Inter", -apple-system, "Segoe UI", Arial, sans-serif;
  text-transform: none;
  letter-spacing: 0;
}
.gb-submit-grid input:focus, .gb-submit-grid select:focus { outline: 0; border-color: #1f2f55; box-shadow: 0 0 0 3px rgba(31, 47, 85, 0.15); background: #fff; }
.gb-submit-grid label:nth-child(4) { grid-column: 1 / -1; }
.gb-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.gb-submit-error { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: #fbf0e4; color: #8a4b12; font-size: 14px; }
.gb-submit-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.gb-submit-fine { margin: 14px 0 0; color: #8b95a1; font-size: 12px; }

@media screen and (max-width: 560px) {
  .gb-submit-panel { flex-direction: column; align-items: stretch; }
  .gb-submit-grid { grid-template-columns: 1fr; }
}

@media print {
  .gb-submit-panel, dialog.gb-submit { display: none !important; }
}
