 :root {
      --primary: #4ea8de;
      --secondary: #7400b8;
      --dark: #1f1f1f;
      --light: #f9f9f9;
  --brand: #0d6efd;
    }

    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      background-color: var(--light);
      color: var(--dark);
      display: flex;
      flex-direction: column;
      min-height: 100vh;
    }

    .header {
      padding: 1.2rem 2rem;
      background: var(--dark);
      color: white;
      font-size: 1.5rem;
      font-weight: bold;
      text-align: center;
    }

    /* Keep Bootstrap container untouched; scope our layout */
    .wsdl-layout { flex:1; display:flex; justify-content:center; align-items:flex-start; gap:24px; padding: 6px 16px 40px; }

    .card { background: white; padding: 1.25rem; border-radius: 16px; box-shadow: 0 8px 20px rgba(0,0,0,0.06); width: 100%; animation: fadeIn 0.8s ease-in-out; }
    .card.card-soft { border:1px solid #e5e8ec; }

    h2 { text-align:center; margin-bottom: 1.2rem; font-size: 1.6rem; color: var(--dark); }

    label {
      font-weight: 600;
    }

    .form-control {
      width: 100%;
      padding: 0.75rem;
      border: 1px solid #ccc;
      border-radius: 0.6rem;
      margin-bottom: 1rem;
      font-size: 1rem;
    }

    .form-check {
      margin-bottom: 1.5rem;
    }

    .form-check-label a {
      color: var(--secondary);
      text-decoration: underline;
    }

    .btn-submit {
      background: var(--primary);
      color: #fff;
      font-weight: 700;
      padding: 0.75rem 1rem;
      border: none;
      border-radius: 10px;
      cursor: pointer;
      font-size: 1rem;
      transition: filter 0.2s ease;
    }

    .btn-submit:hover { filter: brightness(0.98); }

    .preview-btn {
      background: transparent;
      border: none;
      color: var(--secondary);
      font-size: 0.9rem;
      margin-top: -12px;
      margin-bottom: 12px;
      cursor: pointer;
      text-decoration: underline;
    }

    footer {
      text-align: center;
      padding: 1.2rem;
      background: var(--dark);
      color: white;
      font-size: 0.9rem;
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
        transform: translateY(40px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* Modal styling */
    .modal {
      display: none;
      position: fixed;
      z-index: 999;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      overflow: auto;
      background-color: rgba(0,0,0,0.5);
    }

    .modal-content {
      background-color: white;
      margin: 10% auto;
      padding: 20px;
      border-radius: 1rem;
      width: 90%;
      max-width: 500px;
      font-size: 0.9rem;
      white-space: pre-wrap;
    }

    .close {
      color: #aaa;
      float: right;
      font-size: 28px;
      cursor: pointer;
    }

    lottie-player {
      width: 200px;
      margin: auto;
      display: block;
    }

    .stepper {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}
.step-wrapper {
  text-align: center;
}
.step {
  width: 32px;
  height: 32px;
  background: #ccc;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}
.step.active {
  background: var(--primary, #007bff);
}

 .progress-bar {
      width: 100%;
      background-color: #eee;
      border-radius: 10px;
      overflow: hidden;
      height: 12px;
    }
    .progress { height:100%; width:0; background: linear-gradient(90deg, #31c37c, #0f8f50); transition: width 0.4s ease; }

    .btn-insert {
  background: #eee;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: 0.2s;
}

.btn-insert:hover {
  background: #d7ecff;
  border-color: #4ea8de;
}

#variables-box {
  background-color: white;
  width: 25%;
}

.toggle-section {
  background: transparent;
  border: none;
  color: var(--secondary);
  font-size: 0.95rem;
  margin: 0.6rem 0;
  text-decoration: underline;
  cursor: pointer;
}

.header-row {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
  align-items: center;
}

.header-row .form-control {
  flex: 1;
  min-width: 0;
}

.btn-remove {
  background: #e74c3c;
  border: none;
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
}

.btn-add {
  margin-top: 0.6rem;
  background: #3498db;
  color: white;
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-block;
}

/* Scoped styles for WSDL page (no global overrides) */
#wsdlCard .wsdl-summary { font-size: 0.95rem; line-height: 1.4; }
#wsdlCard .operation-card { background: white; border: 1px solid #efefef; padding: 12px; border-radius: 8px; }
#wsdlCard .operation-card .op-title { font-size: 1rem; color: var(--dark); }
#wsdlCard .operation-card .op-description { color: #666; }
#wsdlCard .op-response-template { min-height: 110px; font-family: monospace; font-size: 0.9rem; }
#wsdlCard .op-endpoint-path { width: auto; max-width: 320px; }

#wsdlHelpModal .modal-content pre { white-space: pre-wrap; max-height: 60vh; overflow: auto; background: #fafafa; padding: 10px; border-radius: 6px; border: 1px solid #eee; }

/* buttons already used (btn-add, btn-insert, btn-submit) exist; ensure spacing */
#wsdlCard .btn-add { padding: 8px 12px; border-radius: 8px; }
#wsdlCard .btn-insert { padding: 8px 12px; border-radius: 8px;  margin: 9.6px 0 0 0;}
#wsdlCard .btn-submit { min-width: 180px; }

/* ========== Nuovi bottoni e varianti ========== */
.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: transform .12s ease, box-shadow .12s ease;
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(78,168,222,0.14); }
.btn-primary:disabled { opacity: 0.6; transform:none; cursor: not-allowed; }

.btn-secondary {
  background: transparent;
  border: 1px solid #d0d5da;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  color: var(--dark);
}
.btn-secondary:hover { background:#f4f6f8; }

/* small insert buttons */
.btn-insert { padding: 0.35rem 0.6rem; border-radius: 6px; border:1px solid #e0e6ea; background:#fafafa; cursor:pointer; }
.btn-insert:hover { background: #f0fbff; border-color: #cfeefc; }

/* keeps your .btn-add style but aligned with primary */
.btn-add { background: #3498db; color: white; padding: 0.5rem 0.8rem; border-radius: 8px; border: none; cursor:pointer; }
.btn-add:hover { transform: translateY(-1px); }

/* widen main card to give more room for operation templates
   but keep responsive behavior (mobile -> full width) */
@media (min-width: 980px) {
  .container { align-items: flex-start; }
  .card#wsdlCard { max-width: calc(100% - 360px); } /* leaves room for sidebar ~320px + gap */
  .variables-box { width: 320px; }
}

/* mobile: stack vertically */
@media (max-width: 979px) {
  .card#wsdlCard { max-width: 100%; }
  .variables-box { width: 100%; margin-left: 0; margin-top: 16px; }
}

/* modal API key display styling */
.modal-content pre.api-key-display {
  background: #f7fbff;
  border: 1px dashed #cfeefc;
  padding: 12px;
  border-radius: 8px;
  overflow-wrap: anywhere;
}

/* small tweak to textarea font for soap xml readability */
.op-response-template { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", monospace; font-size: 0.95rem; line-height:1.35; }

#finalAnimation {
  display: none;
  text-align: center;
  margin-top: 2rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
}

/* Hero styles for parity with generate_api */
.hero-modern { position:relative; overflow:hidden; padding:60px 16px 28px; background: radial-gradient(1200px 600px at 80% -10%, rgba(13,110,253,0.18), transparent 60%), linear-gradient(180deg,#ffffff, #f7f9fc); }
.hero-modern .inner { max-width:1080px; margin:0 auto; display:flex; gap:22px; align-items:center; justify-content:space-between; }
.hero-kicker { display:inline-flex; gap:8px; align-items:center; padding:6px 10px; border-radius:999px; background:#eaf2ff; color:#174ea6; font-weight:600; font-size:0.8rem; }
.hero-title { font-size: clamp(1.9rem, 4.6vw, 2.6rem); line-height:1.1; color:var(--dark); margin:10px 0 8px; font-weight:800; }
.hero-sub { font-size:1rem; color:#6b7280; max-width:60ch; }

/* Mobile tweaks: stack hero content and center text, shrink illustration; stack action buttons */
@media (max-width: 768px) {
  .hero-modern .inner { flex-direction: column; align-items: center; text-align: center; gap: 10px; }
  .hero-modern .inner > div:first-child { width: 100%; }
  .hero-modern .inner [aria-hidden=true] lottie-player { max-width: 130px; }
  #wsdlCard .actions { flex-direction: column; }
  #wsdlCard .actions .btn-submit,
  #wsdlCard .actions .btn-secondary { width: 100%; }
}

/* Responsive layout adjustments */
@media (max-width: 979px) {
  .wsdl-layout { flex-direction: column; align-items: stretch; }
}


