/* ============================================================
   LEX SCRIPTA — SUBMISSION FORM STYLES  v3.0
    ============================================================ */

:root {
  --lxf-red:    #8B0000;
  --lxf-dark:   #1a1a2e;
  --lxf-radius: 12px;
  --lxf-shadow: 0 2px 12px rgba(0,0,0,.06);
}

* { box-sizing: border-box; }

/* ── Cards ─────────────────────────────────────────────── */
.lxf-card {
  background: #fff;
  border: 1px solid #eee;
  border-left: 4px solid var(--lxf-red);
  border-radius: 0 var(--lxf-radius) var(--lxf-radius) 0;
  padding: 28px 32px;
  margin-bottom: 20px;
  box-shadow: var(--lxf-shadow);
}
.lxf-card__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--lxf-red);
  margin: 0 0 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid #fce8e8;
}
.lxf-icon { font-size: 20px; line-height: 1; }
.lxf-sub  { font-size: 12px; font-weight: 400; color: #999; margin-left: 6px; }

/* ── Grid ───────────────────────────────────────────────── */
.lxf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lxf-full { grid-column: 1 / -1; }

/* ── Fields ─────────────────────────────────────────────── */
.lxf-field       { display: flex; flex-direction: column; gap: 5px; }
.lxf-label       { font-size: 11.5px; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: .5px; }
.lxf-req         { color: var(--lxf-red); margin-left: 1px; }
.lxf-hint        { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 11px; color: #aaa; margin-left: 4px; }

/* ── Inputs ─────────────────────────────────────────────── */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="number"],
.wpcf7-form select,
.wpcf7-form textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid #e0e0e0; border-radius: 8px;
  font-size: 14px; font-family: inherit; color: #333;
  background: #fafafa; transition: all .2s; -webkit-appearance: none;
}
.wpcf7-form input:focus,
.wpcf7-form select:focus,
.wpcf7-form textarea:focus {
  outline: none; border-color: var(--lxf-red);
  background: #fff; box-shadow: 0 0 0 3px rgba(139,0,0,.07);
}
.wpcf7-form textarea                 { min-height: 120px; resize: vertical; }
.wpcf7-form input[type="file"]       { padding: 8px 12px; background: #f9f9f9; border-style: dashed; cursor: pointer; }
.wpcf7-form .wpcf7-form-control-wrap { display: block; width: 100%; }

/* ── Checkboxes ─────────────────────────────────────────── */
.lxf-accept .wpcf7-acceptance { display: flex; align-items: flex-start; gap: 10px; }
.lxf-accept .wpcf7-acceptance input[type="checkbox"] {
  width: 17px; height: 17px; flex-shrink: 0;
  margin-top: 2px; accent-color: var(--lxf-red); cursor: pointer;
}
.lxf-accept .wpcf7-list-item       { margin: 0; }
.lxf-accept .wpcf7-list-item-label { font-size: 13.5px; color: #444; line-height: 1.6; cursor: pointer; }
.lxf-declarations                  { display: flex; flex-direction: column; gap: 12px; }

/* ── Co-author Selector ─────────────────────────────────── */
.lxf-co-selector {
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap; padding: 16px 20px;
  background: #fafafa; border-radius: 10px; margin-bottom: 16px;
}
.lxf-co-label { font-size: 14px; font-weight: 600; color: #444; white-space: nowrap; }
.lxf-co-tabs  {
  display: flex; border-radius: 9px; overflow: hidden;
  border: 1.5px solid #ddd; box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.lxf-co-tab {
  padding: 10px 22px; border: none; border-right: 1.5px solid #ddd;
  background: #fff; font-size: 13px; font-weight: 600;
  color: #666; cursor: pointer; transition: all .18s; white-space: nowrap;
}
.lxf-co-tab:last-child         { border-right: none; }
.lxf-co-tab:hover:not(.active) { background: #fff5f5; color: var(--lxf-red); }
.lxf-co-tab.active             { background: var(--lxf-red); color: #fff; border-color: var(--lxf-red); }

/* ── Co-author Panels ───────────────────────────────────── */
.lxf-co-panel {
  margin-top: 20px; padding-top: 20px;
  border-top: 1.5px dashed #eee; animation: lxfIn .25s ease;
}
.lxf-co-panel__header {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: var(--lxf-red);
  margin-bottom: 16px; padding: 6px 14px;
  background: #fff5f5; border-radius: 20px;
}
.lxf-co-panel__header::before {
  content: ''; width: 8px; height: 8px;
  border-radius: 50%; background: var(--lxf-red); display: inline-block;
}
@keyframes lxfIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Price Bar ──────────────────────────────────────────── */
.lxf-pricebar {
  background: linear-gradient(135deg, var(--lxf-dark) 0%, var(--lxf-red) 100%);
  color: #fff; border-radius: 12px; padding: 22px 28px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 14px; margin-bottom: 20px;
}
.lxf-pricebar__left span {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 1.5px; opacity: .7; display: block; margin-bottom: 5px;
}
.lxf-pricebar__left p { margin: 0; font-size: 14px; opacity: .9; }
.lxf-pricebar__right  { font-size: 38px; font-weight: 800; letter-spacing: -1px; }

/* ── Includes ───────────────────────────────────────────── */
.lxf-includes {
  background: #fff9f9; border: 1px solid #fde;
  border-radius: 10px; padding: 18px 20px; margin-bottom: 4px;
}
.lxf-includes h5        { margin: 0 0 10px; font-size: 13px; color: var(--lxf-red); font-weight: 700; }
.lxf-includes ul        { margin: 0; padding-left: 18px; font-size: 13px; color: #555; line-height: 2.1; }
.lxf-includes ul li::marker { color: var(--lxf-red); }

/* ── Submit Button ──────────────────────────────────────── */
.wpcf7-form input#lxf-submit {
  width: 100%;
  padding: 17px;
  background: var(--lxf-red);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .4px;
  transition: background .2s, transform .15s;
  margin-top: 8px;
}
.wpcf7-form input#lxf-submit:hover  { background: #a00000; transform: translateY(-1px); }
.wpcf7-form input#lxf-submit:active { transform: translateY(0); }

/* ── Pay note below submit ──────────────────────────────── */
.lxf-pay-note {
  text-align: center;
  font-size: 12px;
  color: #aaa;
  margin: 10px 0 0;
}

/* ── Redirecting overlay ────────────────────────────────── */
.lxf-redirecting {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,26,46,.85);
  z-index: 99999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: #fff;
}
.lxf-redirecting.active { display: flex; }
.lxf-redirecting__spinner {
  width: 48px; height: 48px;
  border: 4px solid rgba(255,255,255,.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: lxfSpin .8s linear infinite;
}
.lxf-redirecting__text { font-size: 17px; font-weight: 600; letter-spacing: .3px; }
.lxf-redirecting__sub  { font-size: 13px; opacity: .6; }
@keyframes lxfSpin { to { transform: rotate(360deg); } }

/* ── CF7 Response Messages ──────────────────────────────── */
.wpcf7-response-output {
  border-radius: 8px !important;
  margin-top: 16px !important;
  padding: 12px 16px !important;
}
.wpcf7-mail-sent-ok      { background: #f0fdf4 !important; border-color: #86efac !important; color: #166534 !important; }
.wpcf7-validation-errors { background: #fff7ed !important; border-color: #fed7aa !important; color: #9a3412 !important; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .lxf-grid            { grid-template-columns: 1fr !important; }
  .lxf-card            { padding: 20px 16px !important; }
  .lxf-co-selector     { flex-direction: column; align-items: flex-start; }
  .lxf-pricebar        { flex-direction: column; text-align: center; }
  .lxf-pricebar__right { font-size: 28px; }
  .wpcf7-form input[type="text"],
  .wpcf7-form input[type="email"],
  .wpcf7-form input[type="tel"],
  .wpcf7-form input[type="number"],
  .wpcf7-form select,
  .wpcf7-form textarea { font-size: 16px !important; } /* prevent iOS zoom */
}
