:root{
  --bg:#0f0f14;
  --panel:#201C2B;
  --panel-2:#2a2540;
  --text:#e8e6f3;
  --text-dim:#c9c6de;
  --accent:#6c5dd3;
  --accent-2: #7b3ff2;   /* same as global */
  --danger:#ff6b6b;
  --shadow:0 10px 24px rgba(0,0,0,.45);
  --radius:16px;
}

/* === LOCK PAGE BACKGROUND (Submit page) === */
body.submit-body {
  background: #0f131a !important;
  color: #e6edf3; /* keep your light text */
}

/* Layout: NARROWER PAGE CONTAINER */
.submit-wrap{
  /* make the whole page section skinnier */
  max-width: 600px;  /* was 980px */
  margin: 40px auto 80px;
  padding: 0 16px;
}

.card{
  background: linear-gradient(180deg, var(--panel) 0%, #1b1830 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.06);
}
.submit-card{ padding: 24px; }

/* Header */
.submit-header{
  display: flex; align-items: flex-end; gap: 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding-bottom: 12px; margin-bottom: 20px;
}
.submit-header h1{ margin: 0; font-size: 28px; letter-spacing: .2px; }

/* Single-column form, with an additional max-width cap */
.submit-form{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;

  /* hard cap for the form itself to keep it slim on huge screens */
  max-width: 660px;
  margin: 0 auto;     /* center the form inside the card */
}

.submit-form label{
  font-weight: 600; color: var(--text-dim); margin-top: 6px;
}
.submit-form input[type="text"],
.submit-form input[type="email"],
.submit-form textarea{
  width: 100%;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  box-shadow: inset 0 0 0 9999px rgba(255,255,255,0);
}
.submit-form textarea{ resize: vertical; }

.submit-form input:focus,
.submit-form textarea:focus{
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108,93,211,.25);
}

/* Legacy gradient button (kept if referenced elsewhere) */
.btn-primary{
  margin-top: 8px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff; border: none; border-radius: 999px; padding: 12px 18px;
  font-weight: 700; cursor: pointer; transition: transform .04s ease, filter .2s ease;
}
.btn-primary:active{ transform: translateY(1px); }
.btn-primary[disabled]{ opacity: .6; cursor: not-allowed; filter: grayscale(.3); }

/* Validation */
.form-error{ margin: 6px 2px 0; min-height: 18px; color: var(--danger); font-weight: 600; }

/* Toast */
.toast{
  position: fixed; left: 50%; transform: translateX(-50%) translateY(20px);
  bottom: 24px; background: #1b1731; color: var(--text);
  border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 12px 16px;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.toast.show{ opacity: 1; transform: translateX(-50%) translateY(0); }

/* On phones, let it breathe edge-to-edge while staying readable */
@media (max-width: 480px){
  .submit-wrap{ max-width: 100%; }
  .submit-form{ max-width: 100%; }
}

/* === WIDEN SUBMIT FORM (OVERRIDE) === */
.submit-wrap,
.submit-card,
.submit-form {
  max-width: 750px !important;   /* change this number to taste: 840 / 960 / 1040 */
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* keep good spacing top/bottom */
.submit-wrap { 
  padding-left: 16px;
  padding-right: 16px;
  margin-top: 32px;
  margin-bottom: 48px;
}

/* inputs should stretch the wider card */
.submit-form input[type="text"],
.submit-form input[type="email"],
.submit-form select,
.submit-form textarea,
.submit-form button {
  width: 100%;
}

/* optional: give it a little more at very large screens */
@media (min-width: 900px){
  .submit-wrap,
  .submit-card,
  .submit-form { max-width: 750px !important; }
}

/* === Make only the Format dropdown narrower (still purple) === */
.submit-form select#deckFormat,
.submit-form select[name="format"] {
  width: 150px !important;     /* pick your width: 240/280/320px, etc. */
  max-width: 100%;
  display: inline-block;        /* prevents full-row stretch */
}

/* ===== Submit form: purple Format dropdown (with custom chevron) ===== */
.submit-form select,
.submit-form select#deckFormat,
.submit-form select[name="format"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background: var(--panel-2);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;

  height: 40px;
  line-height: 40px;
  padding: 0 36px 0 12px;         /* room for arrow on the right */

  /* custom white chevron */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='white'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px 16px;
}

.submit-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108,93,211,.25); /* soft purple focus ring */
}

/* Hide legacy arrow (old Edge/IE) */
.submit-form select::-ms-expand { display: none; }

/* ===== Submit button: centered + matte purple match ===== */
#submitBtn {
  width: 240px !important;

  /* matte purple look (same family as Filters) */
  background: var(--accent-2);
  border: 1px solid var(--accent-2);
  color: #fff;
  box-shadow: none;
  text-shadow: none;

  /* center in grid */
  justify-self: center;
  align-self: center;
  display: inline-block;
  margin: 14px 0 0;   /* top spacing only */
}

/* subtle, matte hover/active (no glow) */
#submitBtn:hover {
  background: color-mix(in oklab, var(--accent-2) 88%, black);
  border-color: color-mix(in oklab, var(--accent-2) 88%, black);
}
#submitBtn:active {
  background: color-mix(in oklab, var(--accent-2) 78%, black);
  border-color: color-mix(in oklab, var(--accent-2) 78%, black);
}

/* Fallback for browsers without color-mix support */
@supports not (background: color-mix(in oklab, red 50%, black)) {
  #submitBtn:hover { filter: brightness(0.96); }
  #submitBtn:active { filter: brightness(0.90); }
}
/* Submit button — same matte purple as Filters */
#submitBtn {
  background: var(--accent-2);
  border: 1px solid var(--accent-2);
  color: #fff;
}
#submitBtn.btn-primary {
  background: var(--accent-2) !important;
  border-color: var(--accent-2) !important;
  border-radius: 10px; /* keep your shape, optional */
}
/* Floating Filters button (viewport-following) */
#openFilters{
  position: fixed !important;
  top: calc(var(--header-h, 64px) + 12px);
  right: 16px;
  z-index: 70;
}

@media (max-width: 780px){
  #openFilters{
    top: auto;
    bottom: 16px;
  }
}
/* Remove rounded corners on the Submit page card */
.submit-wrap .card,
.submit-card {
  border-radius: 0 !important;
}

/* Submit button — square corners (keeps your matte purple) */
#submitBtn,
#submitBtn.btn-primary {
  border-radius: 0 !important;
}

