/*
  Checkout UI (modern + responsive)
  Scope: .amadeus-api-checkout
*/

:root{
  --am2-bg:#f6f8fc;
  --am2-card:#ffffff;
  --am2-text:#0f172a;
  --am2-muted:#64748b;
  --am2-border:rgba(15,23,42,.10);
  --am2-shadow:0 10px 30px rgba(15,23,42,.08);
  --am2-radius:18px;
  --am2-radius-sm:14px;
  --am2-accent:#2563eb;
  --am2-accent-2:#0ea5e9;
  --am2-danger:#ef4444;
  --am2-success:#10b981;
}

/* Layout */
.amadeus-api-checkout{
  background:var(--am2-bg);
  padding:18px 0 26px;
  color:var(--am2-text);
}

.amadeus-ui-wrap{max-width:1180px;margin:0 auto;padding:0 16px}

.amadeus-ui-topbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}

.amadeus-ui-breadcrumb{
  font-size:12px;
  color:var(--am2-muted);
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}

.amadeus-ui-breadcrumb .sep{opacity:.6}

.amadeus-ui-title{margin:4px 0 0;font-size:22px;line-height:1.15;font-weight:800}
.amadeus-ui-subtitle{margin:6px 0 0;font-size:13px;color:var(--am2-muted)}

.am2-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 12px;
  border:1px solid var(--am2-border);
  border-radius:999px;
  font-size:12px;
  color:var(--am2-muted);
  background:rgba(255,255,255,.75);
  backdrop-filter:saturate(140%) blur(8px);
}

.amadeus-ui-grid{
  display:grid;
  grid-template-columns:1fr 380px;
  gap:18px;
  align-items:start;
}
@media (max-width:980px){
  .amadeus-ui-grid{grid-template-columns:1fr}
}

/* Cards */
.am2-card{
  background:var(--am2-card);
  border:1px solid var(--am2-border);
  border-radius:var(--am2-radius);
  box-shadow:var(--am2-shadow);
}
.am2-pad{padding:16px}
.am2-card + .am2-card{margin-top:14px}

.am2-card h2{margin:0 0 6px;font-size:16px;font-weight:900}
.am2-card h3{margin:0 0 10px;font-size:14px;font-weight:900}

.am2-card-head,
.am2-section-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.am2-section-head .meta{font-size:12px;color:var(--am2-muted)}

/* Notices */
.amadeus-api-error,.amadeus-api-notice{
  border-radius:14px;
  padding:12px 14px;
  border:1px solid var(--am2-border);
  margin:12px 0;
}
.amadeus-api-error{background:rgba(239,68,68,.10)}
.amadeus-api-notice{background:rgba(16,185,129,.10)}

/* Forms */
.amadeus-api-checkout-form label{display:block}

.am2-label{display:block;font-size:12px;font-weight:800;color:var(--am2-muted);margin:10px 0 6px}

.am2-input,
.am2-select,
.amadeus-api-checkout-form input[type="text"],
.amadeus-api-checkout-form input[type="email"],
.amadeus-api-checkout-form input[type="date"],
.amadeus-api-checkout-form select{
  width:100%;
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,.16);
  background:#fff;
  color:var(--am2-text);
  outline:none;
  transition:box-shadow .15s ease,border-color .15s ease,transform .15s ease;
  font-size:14px;
}

.am2-input:focus,
.am2-select:focus,
.amadeus-api-checkout-form input:focus,
.amadeus-api-checkout-form select:focus{
  border-color:rgba(37,99,235,.55);
  box-shadow:0 0 0 4px rgba(37,99,235,.14);
}

.amadeus-api-checkout-form input:invalid:focus{box-shadow:0 0 0 4px rgba(239,68,68,.14);border-color:rgba(239,68,68,.55)}

.amadeus-api-field-row,
.am2-fields{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

@media (max-width:720px){
  .amadeus-api-field-row,
  .am2-fields{grid-template-columns:1fr}
}

.am2-span2{grid-column:1/-1}

/* Traveler accordion (details/summary) */
.am2-details{
  border:1px solid var(--am2-border);
  border-radius:var(--am2-radius);
  overflow:hidden;
  background:rgba(255,255,255,.75);
}

.am2-details + .am2-details{margin-top:12px}

.am2-details > summary{
  list-style:none;
  cursor:pointer;
  padding:14px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  font-weight:900;
}
.am2-details > summary::-webkit-details-marker{display:none}

.am2-details > summary .sub{
  font-weight:700;
  font-size:12px;
  color:var(--am2-muted);
}

.am2-details > summary .chev{
  width:10px;height:10px;
  border-right:2px solid rgba(15,23,42,.55);
  border-bottom:2px solid rgba(15,23,42,.55);
  transform:rotate(45deg);
  transition:transform .2s ease;
  flex:0 0 auto;
}

.am2-details[open] > summary .chev{transform:rotate(225deg)}

.am2-details__body{padding:0 14px; overflow:hidden; max-height:0; transition:max-height .28s ease, padding .28s ease;}
.am2-details.is-open .am2-details__body{padding:0 14px 14px}

/* Payment choices */
.am2-choice-grid{display:grid;grid-template-columns:1fr;gap:10px}

.am2-choice{
  border:1px solid var(--am2-border);
  border-radius:var(--am2-radius-sm);
  background:rgba(255,255,255,.75);
  padding:12px 12px;
  display:flex;
  align-items:flex-start;
  gap:12px;
  cursor:pointer;
  transition:transform .12s ease,box-shadow .12s ease,border-color .12s ease;
}

.am2-choice:hover{transform:translateY(-1px);box-shadow:0 8px 18px rgba(15,23,42,.08)}

.am2-choice input{margin-top:3px}

.am2-choice .title{font-weight:900;line-height:1.2}
.am2-choice .desc{margin-top:4px;font-size:12px;color:var(--am2-muted);line-height:1.35}

.am2-choice.is-selected{border-color:rgba(37,99,235,.40);box-shadow:0 0 0 4px rgba(37,99,235,.12)}

/* Buttons */
.amadeus-api-primary{
  appearance:none !important;
  width:100%;
  border-radius:16px !important;
  border:1px solid rgba(37,99,235,.22) !important;
  background:linear-gradient(135deg,var(--am2-accent),var(--am2-accent-2)) !important;
  color:#fff !important;
  padding:14px 16px !important;
  font-weight:900 !important;
  font-size:14px !important;
  cursor:pointer;
  transition:transform .12s ease,filter .12s ease,opacity .12s ease;
}

.amadeus-api-primary:hover{filter:brightness(1.03)}
.amadeus-api-primary:active{transform:translateY(1px)}
.amadeus-api-primary[disabled]{opacity:.7;cursor:not-allowed}

.am2-btn-row{margin-top:14px}

/* Summary */
.am2-summary{position:sticky;top:18px}
@media(max-width:980px){.am2-summary{position:static}}

.am2-kv{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px;color:var(--am2-muted);margin:10px 0}
.am2-kv strong{color:var(--am2-text);font-weight:900}
.am2-divider{height:1px;background:rgba(15,23,42,.10);margin:12px 0}

.am2-mini{font-size:12px;color:var(--am2-muted);line-height:1.35}

/* Add-ons placeholder */
.amadeus-api-addons-placeholders{margin:10px 0 0;padding:0 0 0 18px;color:var(--am2-muted)}
.amadeus-api-addons-placeholders li{margin:6px 0}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .am2-choice,.amadeus-api-primary,.am2-details > summary .chev{transition:none}
  .am2-choice:hover{transform:none}
}



/* ------------------------------------------------------------
   Desktop polish + consistent typography (v1.4.9 UI refresh)
   ------------------------------------------------------------ */
.amadeus-api-checkout, .amadeus-api-checkout *{
  box-sizing:border-box;
}
.amadeus-api-checkout{
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";
  font-size:14px;
  line-height:1.45;
}
.amadeus-ui-wrap{max-width:1240px;padding:0 18px}
@media (min-width:981px){
  .amadeus-ui-topbar{margin-bottom:18px}
  .amadeus-ui-grid{gap:24px}
  .amadeus-ui-grid{grid-template-columns:minmax(0,1fr) 420px}
}
@media (min-width:1280px){
  .amadeus-ui-grid{grid-template-columns:minmax(0,1fr) 460px}
}

:root{
  --am2-shadow: 0 12px 34px rgba(15,23,42,.08);
  --am2-shadow-sm: 0 8px 18px rgba(15,23,42,.06);
}

/* Cards feel more “app-like” */
.am2-card{
  border-radius:22px;
  box-shadow:var(--am2-shadow);
}
.am2-pad{padding:18px}
@media (min-width:981px){
  .am2-pad{padding:20px}
  .am2-card + .am2-card{margin-top:16px}
}
.am2-card h2{font-size:17px}
.am2-card h3{font-size:15px}

/* Inputs + selects */
.amadeus-api-checkout input[type="text"],
.amadeus-api-checkout input[type="email"],
.amadeus-api-checkout input[type="tel"],
.amadeus-api-checkout input[type="number"],
.amadeus-api-checkout input[type="date"],
.amadeus-api-checkout select,
.amadeus-api-checkout textarea{
  font: inherit;
  width:100%;
  background:#fff;
  border:1px solid rgba(15,23,42,.12);
  border-radius:14px;
  padding:11px 12px;
  transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}
.amadeus-api-checkout select{padding-right:34px}
.amadeus-api-checkout textarea{min-height:92px;resize:vertical}
.amadeus-api-checkout input:focus,
.amadeus-api-checkout select:focus,
.amadeus-api-checkout textarea:focus{
  outline:none;
  border-color: rgba(37,99,235,.45);
  box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}
.amadeus-api-checkout input:disabled,
.amadeus-api-checkout select:disabled{
  opacity:.75;
  background:rgba(15,23,42,.03);
}

/* Make the right “Summary” card sticky on desktop for better UX */
@media (min-width:981px){
  .amadeus-api-checkout-summary{
    position: sticky;
    top: 18px;
  }
}

/* Cleaner button styling + micro-interactions */
.amadeus-api-checkout .am2-btn,
.amadeus-api-checkout button,
.amadeus-api-checkout input[type="submit"]{
  border-radius:14px;
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.amadeus-api-checkout .am2-btn:hover,
.amadeus-api-checkout button:hover,
.amadeus-api-checkout input[type="submit"]:hover{
  transform: translateY(-1px);
  box-shadow: var(--am2-shadow-sm);
}
.amadeus-api-checkout .am2-btn:active,
.amadeus-api-checkout button:active,
.amadeus-api-checkout input[type="submit"]:active{
  transform: translateY(0);
  box-shadow:none;
}

/* Subtle section separators + spacing consistency */
.am2-divider{
  height:1px;
  background:rgba(15,23,42,.08);
  margin:14px 0;
}
@media (min-width:981px){
  .am2-divider{margin:16px 0}
}

/* Improve “accordion” feel for traveler cards if present */
.am2-accordion-item{
  border-radius:18px;
  overflow:hidden;
}
.am2-accordion-head{
  cursor:pointer;
  user-select:none;
  transition: background .15s ease;
}
.am2-accordion-head:hover{
  background: rgba(15,23,42,.03);
}

/* Mobile: keep spacing tight but readable */
@media (max-width:520px){
  .am2-pad{padding:14px}
  .amadeus-ui-title{font-size:20px}
}
