@import url('https://fonts.googleapis.com/css2?family=Dosis:wght@400;600;700&family=Roboto+Slab:wght@400;500&display=swap');

:root {
  --primary-green: #3b773b;
  --primary-hover: #224422;
  --surface-base: #ffffff;
  --surface-low: #eaeaea;
  --surface-lowest: #f8f9fa;
  --text-primary: #212529;
  --text-muted: #6c757d;
  
  --radius-global: 7px;
  --ambient-shadow: 0px 15px 35px rgba(59, 119, 59, 0.06);
  --ambient-shadow-hover: 0px 20px 40px rgba(59, 119, 59, 0.08);
  --ghost-border: 1px solid rgba(59, 119, 59, 0.2);
  --ghost-border-dashed: 2px dashed rgba(59, 119, 59, 0.3);
  
  --font-ui: 'Dosis', Helvetica Neue, Arial, sans-serif;
  --font-content: 'Roboto Slab', Georgia, Times, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background-color: var(--surface-base);
  color: var(--text-primary);
  font-family: var(--font-content);
  font-size: 16px; 
  line-height: 1.5;
}

h1, h2, h3, h4, a, label, button, .ui-text {
  font-family: var(--font-ui);
}

/* =========================================================
   Global Header
   ========================================================= */
header.global-header {
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  background-color: var(--surface-base);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 0.3s ease;
}
body.scrolled header.global-header {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
header.global-header .logos img { height: 40px; margin-right: 15px; }
header.global-header .langs a {
  text-decoration: none; font-weight: 600; color: var(--text-muted); font-size: 1.1rem; margin-left: 10px; transition: color 0.2s;
}
header.global-header .langs a:hover, header.global-header .langs a.active { color: var(--text-primary); }

/* =========================================================
   Chevron Progress Stepper
   ========================================================= */
.stepper-sticky-wrapper {
  position: sticky;
  top: 70px;
  z-index: 90;
  height: 56px;
  margin-bottom: 40px;
  pointer-events: none; /* Allow clicks to pass through to the form if needed, but inner stepper-container will override */
}
.stepper-container {
  display: flex;
  width: 100%;
  height: 56px;
  background-color: var(--surface-low);
  overflow: hidden;
  pointer-events: auto; /* Re-enable clicks for the stepper itself */
  transition: height 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
}
body.scrolled .stepper-container {
  height: 8px;
  box-shadow: 0 4px 10px rgba(59, 119, 59, 0.2);
}
.stepper-step {
  flex: 1; text-align: center; position: relative; padding: 15px 20px 15px 40px;
  color: var(--text-muted); font-family: var(--font-ui); font-weight: 600; font-size: 1.1rem;
  background-color: var(--surface-low);
  clip-path: polygon(calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 0 100%, 20px 50%, 0 0);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  white-space: nowrap;
}
body.scrolled .stepper-step {
  padding-top: 0; padding-bottom: 0; color: transparent;
  height: 8px;
  clip-path: polygon(calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%, 0 0);
}
.stepper-step:first-child {
  padding-left: 40px;
  clip-path: polygon(calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 0 100%, 0 50%, 0 0);
}
.stepper-step.active { background-color: var(--primary-green); color: var(--surface-base); }
.stepper-step.completed { background-color: var(--primary-green); color: var(--surface-base); }
.stepper-step.completed::after { content: ' \2713'; }
@media (max-width: 768px) {
  .stepper-step { font-size: 0.65rem; padding: 8px 5px 8px 15px; }
  .stepper-step:first-child { padding-left: 5px; }
}

/* =========================================================
   Form Layout & Step Containers
   ========================================================= */
form { max-width: 900px; margin: 0 auto 100px; padding: 0 20px; }
.wizard-step { display: none; }
.wizard-step.active { display: block; }
.slide-in-right { animation: slideInRight 0.5s forwards cubic-bezier(0.16, 1, 0.3, 1); }
.slide-in-left { animation: slideInLeft 0.5s forwards cubic-bezier(0.16, 1, 0.3, 1); }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-50px); }
  to { opacity: 1; transform: translateX(0); }
}

.step-intro { text-align: center; margin-bottom: 50px; }
.step-intro h2 { font-size: 2.5rem; color: var(--primary-green); margin-bottom: 20px; }
.step-intro p { font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* =========================================================
   Step 1: Category Selection Cards
   ========================================================= */
.category-cards { 
  display: grid; 
  grid-template-columns: 1fr 1fr 1fr; 
  gap: 30px; 
  margin-top: 40px;
}
@media (max-width: 992px) {
  .category-cards { grid-template-columns: 1fr; }
}

#step-1 .hero-card {
  min-height: 520px;
}

#step-1 .glass-box {
  bottom: 20px; left: 20px; right: 20px; border-radius: var(--radius-global);
  background: rgba(255, 255, 255, 0.95);
  padding: 25px;
  box-shadow: var(--ambient-shadow);
}

#step-1 .glass-box h3 {
  color: var(--primary-green);
  margin-bottom: 10px;
  font-size: 1.6rem;
}

.hero-card.selected {
  outline: 4px solid var(--primary-green);
  outline-offset: -4px;
}

.hero-card.selected .checkmark { opacity: 1; background-color: var(--primary-green); }
.hero-card.selected .checkmark::after { content: '✓'; color: white; font-weight: bold; font-family: sans-serif; }

/* =========================================================
   Step 2: Room Selection State
   ========================================================= */
.room-options { display: flex; flex-direction: column; gap: 40px; }
.hero-card {
  position: relative; border-radius: var(--radius-global); overflow: hidden; box-shadow: var(--ambient-shadow);
  cursor: pointer; background-color: var(--surface-low); min-height: 250px;
}
.hero-card img.bg-illustration { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.hero-card .glass-box {
  position: absolute; bottom: 30px; left: 30px; right: 30px; background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px); padding: 25px; border-radius: var(--radius-global); z-index: 2; transition: background 0.3s;
}
.hero-card:hover .glass-box { background: rgba(255, 255, 255, 0.95); }
.hero-card h3 { font-size: 1.8rem; color: var(--text-primary); margin-bottom: 10px; }
.hero-card p { color: var(--text-primary); }
.hero-card input[type="radio"] { display: none; }
.hero-card .checkmark {
  position: absolute; top: 20px; right: 20px; width: 30px; height: 30px; background-color: var(--surface-base);
  border-radius: 50%; z-index: 3; display: flex; justify-content: center; align-items: center;
  box-shadow: var(--ambient-shadow); opacity: 0; transition: opacity 0.2s;
}
.hero-card input[type="radio"]:checked ~ .glass-box .checkmark { opacity: 1; background-color: var(--primary-green); }
.hero-card input[type="radio"]:checked ~ .glass-box .checkmark::after { content: '✓'; color: white; font-weight: bold; font-family: sans-serif; }

.room-options-combined {
  display: flex; flex-direction: column;
  align-items: center;
  margin-bottom: 40px;
}
.room-options-combined .hero-card {
  width: 100%;
  box-shadow: var(--ambient-shadow);
  border-radius: var(--radius-global);
  min-height: 300px;
  z-index: 2;
}
.room-options-combined .hero-card .glass-box {
  bottom: 20px; left: 20px; right: 20px; padding: 20px 25px;
}
/* Force K1-K5 to always show as checked */
.room-options-combined .hero-card .checkmark {
  opacity: 1;
  background-color: var(--primary-green);
  border: 2px solid var(--primary-green);
}
.room-options-combined .hero-card .checkmark::after {
  content: '✓'; color: white; font-weight: bold; font-family: sans-serif;
}

.k6-extension-card {
  display: flex; align-items: center; padding: 20px 25px;
  background-color: var(--surface-low); cursor: pointer; position: relative;
  transition: background-color 0.3s;
  width: 92%;
  border-bottom-left-radius: var(--radius-global);
  border-bottom-right-radius: var(--radius-global);
  margin-top: -15px;
  padding-top: 35px;
  z-index: 1;
}
.k6-extension-card:hover { background-color: #e0e0e0; }
.k6-extension-card input[type="radio"] { display: none; }
.k6-extension-card .extension-text h4 { font-size: 1.25rem; color: var(--text-primary); margin-bottom: 4px; font-family: var(--font-ui); }
.k6-extension-card .extension-text p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 0; }
.k6-extension-card .checkmark {
  position: absolute; top: 50%; right: 20px; transform: translateY(-50%);
  width: 30px; height: 30px; background-color: var(--surface-base); border-radius: 50%;
  display: flex; justify-content: center; align-items: center; box-shadow: var(--ambient-shadow);
  opacity: 1; border: 2px solid #ccc; transition: all 0.2s;
}
.k6-extension-card input[type="radio"]:checked ~ .checkmark { background-color: var(--primary-green); border-color: var(--primary-green); }
.k6-extension-card input[type="radio"]:checked ~ .checkmark::after { content: '✓'; color: white; font-weight: bold; font-family: sans-serif; }

.room-pricing { color: var(--primary-green); font-weight: 600; font-size: 1.1rem; margin-bottom: 8px; }
.room-pricing-inline { color: var(--primary-green); font-size: 1rem; margin-left: 8px; }
ul.room-desc { line-height: 1.5; padding-left: 20px; margin: 0; color: var(--text-primary); font-size: 0.95rem; }
ul.room-desc li { margin-bottom: 4px; }
.room-desc-footnote { color: var(--text-muted); font-size: 0.85rem; margin-top: 8px; }

.secondary-card { background-color: var(--surface-low); border-radius: var(--radius-global); padding: 30px; display: flex; align-items: center; cursor: pointer; }
.secondary-card input[type="checkbox"], .secondary-card input[type="radio"] {
  appearance: none; width: 24px; height: 24px; border-radius: 3px; background-color: var(--surface-base); margin-right: 20px; position: relative; cursor: pointer; border: none;
}
.secondary-card input[type="checkbox"]:checked, .secondary-card input[type="radio"]:checked { background-color: var(--primary-green); }
.secondary-card input:checked::after { content: '✓'; color: white; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 14px; font-family: sans-serif; }
.secondary-card-text { font-size: 1.2rem; font-family: var(--font-ui); color: var(--text-primary); font-weight: 600; margin-left: 10px;}

/* =========================================================
   Grid Layout Components
   ========================================================= */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .form-grid,
  .form-grid-3 { grid-template-columns: 1fr; }
}

/* Centered date selector row */
.date-selector-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.date-selector-inner {
  flex: 0 1 320px;
  min-width: 200px;
}

/* Form section groups with surface-shift background */
.form-section {
  background-color: var(--surface-lowest);
  border-radius: var(--radius-global);
  padding: 24px 28px 20px;
  margin-bottom: 20px;
}

.form-section-label {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-green);
  margin-bottom: 16px;
}

/* =========================================================
   Macros backwards compatibility (Step 3: Personal Data)
   Academic Commons floating labels & forms
   ========================================================= */
.material {
  position: relative;
  background-color: var(--surface-low);
  border: var(--ghost-border);
  border-radius: var(--radius-global);
  margin-bottom: 20px;
  transition: all 0.3s ease;
  overflow: hidden;
}

.material:focus-within, .material:hover {
  background-color: var(--surface-base);
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  transform: translateY(-1px);
}

.material > input,
.material > textarea,
.material > select {
  box-sizing: border-box;
  width: 100%;
  padding: 1.7rem 1rem 0.5rem;
  background: none;
  border: none;
  outline: none;
  position: relative;
  z-index: 100;
  font-family: var(--font-content);
  font-size: 1rem;
  color: var(--text-primary);
  border-bottom: 2px solid transparent; /* default bottom border */
}

/* Safari: reset native appearance so padding-top is respected and rendering is consistent */
.material > select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
  padding-right: 2.5rem;
}

/* Use JS-managed class instead of :valid/:invalid — Safari handles these inconsistently on selects */
.material > select:not(.has-value) {
  color: transparent;
}
.material > select:not(.has-value) option {
  color: var(--text-primary);
}

/* Floating label base */
.material > label,
.material > textarea + div > label {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 1rem;
  pointer-events: none;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), font-size 0.2s, top 0.2s;
  z-index: 10;
}

.material > textarea + div > label { top: 1.5rem; }

/* Floated State */
.material > input:focus + label,
.material > input:not(:placeholder-shown) + label,
.material > select:focus + label,
.material > select.has-value + label,
.material > textarea:focus + div > label,
.material > textarea:not(:placeholder-shown) + div > label {
  top: 12px;
  font-size: 0.75rem;
  color: var(--primary-green);
  transform: translateY(-50%);
}

.material > .highlight {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-green);
  transform: scaleX(0);
  transition: transform 0.3s;
  z-index: 101;
}

.material > input:focus ~ .highlight,
.material > textarea:focus ~ .highlight,
.material > select:focus ~ .highlight {
  transform: scaleX(1);
}

/* Macros opt-select backwards compat */
.opt-select { display: flex; flex-wrap: wrap; margin-bottom: 20px; }
.opt-select > input[type="radio"] { display: none !important; }
.opt-select-field { flex-grow: 1; position: relative; flex-basis: 16rem; }
.opt-select-field > .material-input { width: 100%; margin: 0; }
.opt-select-field > .material-select { margin: 0; }
.opt-select > label { background-color: var(--surface-low); color: var(--text-primary); padding: 13px 13px 13px 17px; border-radius: 0 4px 0 0; margin-left: -4px; }
.opt-select > div:not(.opt-select-field) { align-self: center; display: flex; align-items: center; }
.opt-select > div:not(.opt-select-field) label { background-color: var(--surface-low); border-radius: 3px; border: 1px solid var(--text-muted); text-align: center; cursor: pointer; user-select: none; padding: 0.2rem; display: block; width: 100%; box-sizing: border-box; }
.opt-select > div:not(.opt-select-field) label:hover { background-color: var(--surface-base); }
input.material-select:checked ~ label.material-input { display: none; }
input.material-select:checked ~ div .material-input, input.material-input:checked ~ div .material-select { display: none; }
input.material-select:checked ~ div label.material-input, input.material-input:checked ~ div label.material-select { padding: 0 0.2rem; height: 0; border-width: 0 1px; overflow: hidden; opacity: 0;}
.material-extended {
  display: flex; flex-direction: column; background: none; margin-bottom: 20px;
}
.material-extended .material { margin-bottom: 5px; flex: 1; }
.material-extended > div:last-child { font-size: 0.8rem; color: var(--text-muted); margin-left: 1rem; }
.material > input[type="file"] { padding-top: 1rem; padding-bottom: 1rem; }

/* =========================================================
   Step 4: Documents (Uploads)
   ========================================================= */
.upload-zone {
  display: block;
  background-color: var(--surface-lowest);
  border: var(--ghost-border-dashed);
  border-radius: var(--radius-global);
  padding: 40px;
  text-align: center;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 30px;
}
.upload-zone:hover { background-color: rgba(59, 119, 59, 0.04); cursor: pointer; transform: translateY(-2px); box-shadow: var(--ambient-shadow); }
.upload-zone.dragover { background-color: rgba(59, 119, 59, 0.08); border-color: var(--primary-green); transform: scale(1.02); }
.upload-zone input[type="file"] { position: absolute; width: 100%; height: 100%; opacity: 0; top: 0; left: 0; cursor: pointer; z-index: 20; }
.upload-zone .ui-text { color: var(--primary-green); font-weight: 600; font-size: 1.2rem; margin-bottom: 10px; }
.upload-zone p { color: var(--text-muted); }
.upload-zone .material { border: none; background: transparent; padding: 0; margin: 0; box-shadow: none; }
.upload-zone .material > label { display: none; }

/* =========================================================
   Step 5: Summary
   ========================================================= */
.summary-container { background-color: var(--surface-lowest); border-radius: var(--radius-global); padding: 32px 40px; }
.summary-section { border-bottom: 1px solid var(--surface-low); padding: 20px 0; }
.summary-section:first-child { padding-top: 0; }
.summary-section:last-child { border-bottom: none; padding-bottom: 0; }
.summary-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.summary-section-title { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); font-weight: 700; }
.summary-edit-btn { background: none; border: none; color: var(--primary-green); cursor: pointer; font-size: 0.85rem; padding: 0; font-family: var(--font-ui); text-decoration: underline; }
.summary-edit-btn:hover { color: var(--primary-hover); }
.summary-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; }
@media (max-width: 600px) { .summary-fields { grid-template-columns: 1fr; } }
.summary-block { margin-bottom: 16px; }
.summary-block:last-child { margin-bottom: 0; }
.summary-block h4 { color: var(--text-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; }
.summary-block p { font-size: 1rem; color: var(--text-primary); }

/* =========================================================
   "What happens next" Timeline
   ========================================================= */
.next-steps-timeline { margin-top: 36px; padding: 28px 32px; background: linear-gradient(135deg, #f0f7f0 0%, #f8f9fa 100%); border-radius: var(--radius-global); border: 1px solid rgba(59,119,59,0.12); }
.next-steps-timeline h3 { font-family: var(--font-ui); color: var(--text-primary); margin: 0 0 24px 0; font-size: 1rem; font-weight: 700; }
.timeline-track { display: flex; align-items: flex-start; }
.timeline-node { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.timeline-circle { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-ui); font-weight: 700; font-size: 1rem; margin-bottom: 10px; }
.timeline-node.active .timeline-circle { background: var(--primary-green); color: #fff; box-shadow: 0 0 0 5px rgba(59,119,59,0.15); }
.timeline-node.pending .timeline-circle { background: #fff; color: var(--text-muted); border: 2px solid #ddd; }
.timeline-node.done .timeline-circle { background: var(--primary-green); color: #fff; }
.timeline-connector { flex: 0 0 30px; height: 2px; background: #ddd; margin-top: 22px; }
.timeline-connector.done { background: var(--primary-green); }
.timeline-text strong { display: block; font-family: var(--font-ui); font-size: 0.85rem; color: var(--text-primary); margin-bottom: 3px; }
.timeline-text span { font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; }
.timeline-node.pending .timeline-text strong { color: var(--text-muted); }
@media (max-width: 600px) {
  .timeline-track { flex-direction: column; align-items: flex-start; }
  .timeline-node { flex-direction: row; align-items: center; text-align: left; gap: 14px; padding: 4px 0; width: 100%; }
  .timeline-circle { margin-bottom: 0; flex-shrink: 0; }
  .timeline-connector { width: 2px; height: 20px; flex: 0 0 20px; margin-top: 0; margin-left: 21px; }
}

/* Privacy section card */
.privacy-section { margin-top: 28px; background: var(--surface-lowest); border-radius: var(--radius-global); padding: 24px 28px; border: 1px solid rgba(59,119,59,0.1); }
.privacy-checkbox { display: flex; align-items: flex-start; gap: 15px; }

/* =========================================================
   Confirmation / Verification Pages
   ========================================================= */
.confirmation-page { padding: 40px 40px 120px; }
.confirmation-hero { text-align: center; margin-bottom: 36px; }
.confirmation-icon { width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; margin: 0 auto 20px; line-height: 1; }
.confirmation-icon.sent { background: rgba(59,119,59,0.1); color: var(--primary-green); }
.confirmation-icon.done { background: var(--primary-green); color: #fff; }
.confirmation-hero h1 { font-family: var(--font-ui); font-size: 2rem; margin-bottom: 10px; color: var(--text-primary); }
.confirmation-hero p.subtitle { color: var(--text-muted); font-size: 1.05rem; }
.confirmation-message { background: var(--surface-lowest); border-radius: var(--radius-global); padding: 28px 32px; margin-bottom: 8px; border: 1px solid var(--surface-low); }
.confirmation-message p { margin-bottom: 10px; line-height: 1.7; }
.confirmation-message p:last-child { margin-bottom: 0; }
.confirmation-message .hint { color: var(--text-muted); font-size: 0.9rem; }
.confirmation-contact { text-align: center; color: var(--text-muted); font-size: 0.85rem; margin-top: 20px; }
.confirmation-contact a { color: var(--primary-green); }

/* =========================================================
   Floating Action Footer
   ========================================================= */
.floating-footer {
  position: fixed; bottom: 0; left: 0; right: 0; background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px); border-top: var(--ghost-border); padding: 20px 40px;
  display: flex; justify-content: space-between; align-items: center; z-index: 100;
}
.btn-primary {
  background-color: var(--primary-green); color: var(--surface-base); border: none; padding: 15px 40px;
  font-size: 1.1rem; border-radius: var(--radius-global); cursor: pointer; box-shadow: var(--ambient-shadow);
  transition: all 0.3s; font-weight: bold;
}
.btn-primary:hover { background-color: var(--primary-hover); box-shadow: var(--ambient-shadow-hover); transform: translateY(-2px); }
.btn-primary:disabled { background-color: #a0c2a0; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-secondary { background-color: transparent; color: var(--text-muted); border: none; padding: 15px 20px; font-size: 1.1rem; cursor: pointer; transition: color 0.3s; }
.btn-secondary:hover:not(:disabled) { color: var(--text-primary); }
.btn-secondary:disabled { color: #ccc; cursor: not-allowed; }

/* File Pills for document upload */
.file-pill-container {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 15px;
}
.file-pill {
  display: flex; align-items: center; gap: 6px; background-color: var(--primary-green); color: white;
  padding: 6px 14px; border-radius: 20px; font-size: 0.9rem; font-family: var(--font-ui);
  box-shadow: 0 4px 10px rgba(59, 119, 59, 0.2); animation: scaleIn 0.3s ease forwards;
}
.file-pill span { max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Form display overrides */
.hidden { display: none !important; }

body:not(.set_longterm) .only_longterm,
body:not(.set_exchange) .only_exchange,
body:not(.set_shortterm) .only_shortterm,
body.set_longterm .not_longterm,
body.set_exchange .not_exchange,
body.set_shortterm .not_shortterm,
body.set_prelude .not_prelude {
  display: none !important;
}

.error-header { background-color: #d25f5d; padding: 1rem; color: #fff; font-weight: bold; width: 100%; text-align: center; }

/* Validation error shake */
.invalid-shake {
  animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
  border: 1px solid #d25f5d !important;
}
@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* Mobile UI optimizations for layout and navigation */
@media (max-width: 768px) {
  form { margin-bottom: 80px; }
  .stepper-step {
    container-type: inline-size;
    flex: 1;
    transition: flex 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .stepper-step.active {
    flex: 3;
  }
  .stepper-step span { display: none; }
  @container (min-width: 85px) {
    .stepper-step span { display: inline; }
  }
  .upload-zone { padding: 20px; }
  .summary-container { padding: 20px 15px; }
  header.global-header { padding: 0 15px; }
  .floating-footer {
    padding: 15px 20px;
    padding-bottom: calc(15px + env(safe-area-inset-bottom));
  }
  .btn-primary {
    padding: 12px 20px;
    font-size: 1rem;
  }
  .btn-secondary {
    padding: 12px 20px;
    font-size: 1rem;
  }
}
