/* Aruba Smart Itinerary Builder — UI v2
   Soft Island Executive · Sand · Warm Teal · Coral
   Fonts: Cormorant Garamond (display) · Jost (body) */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Jost:wght@300;400;500;600&display=swap');

:root {
  --aib-sand:      #f5f0e8;
  --aib-sand-d:    #e8e0d0;
  --aib-cream:     #faf8f4;
  --aib-teal:      #2a9d8f;
  --aib-teal-d:    #1f7a6e;
  --aib-teal-l:    #e8f5f3;
  --aib-coral:     #e76f51;
  --aib-coral-d:   #c85a3d;
  --aib-navy:      #1a2e3b;
  --aib-navy-2:    #243646;
  --aib-text:      #2c3e50;
  --aib-muted:     #7a8c99;
  --aib-border:    rgba(42,157,143,0.15);
  --aib-white:     #ffffff;
  --aib-gold:      #e9c46a;
  --aib-gold-d:    #c9a227;
  --aib-radius:    14px;
  --aib-shadow:    0 4px 24px rgba(26,46,59,0.08);
  --aib-shadow-lg: 0 12px 48px rgba(26,46,59,0.14);
  --aib-font-display: 'Cormorant Garamond', Georgia, serif;
  --aib-font-body:    'Jost', system-ui, sans-serif;
}

.aib-app * { box-sizing: border-box; margin: 0; padding: 0; }
.aib-app { font-family: var(--aib-font-body); color: var(--aib-text); line-height: 1.65; background: var(--aib-cream); }
.aib-app button { cursor: pointer; border: none; outline: none; font-family: var(--aib-font-body); }
.aib-app input, .aib-app textarea { font-family: var(--aib-font-body); outline: none; }

/* ── Hero ── */
.aib-hero {
  position: relative;
  background: var(--aib-navy);
  padding: 72px 32px 96px;
  text-align: center; overflow: hidden;
}
.aib-hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 15% 60%, rgba(42,157,143,0.2) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 20%, rgba(233,196,106,0.12) 0%, transparent 50%);
}
.aib-hero-waves {
  position: absolute; bottom: -1px; left: 0; right: 0; height: 70px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 70'%3E%3Cpath fill='%23faf8f4' d='M0,40 C240,70 480,10 720,40 C960,70 1200,20 1440,40 L1440,70 L0,70 Z'/%3E%3C/svg%3E") center bottom/cover no-repeat;
}
.aib-hero-content { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }
.aib-logo-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(233,196,106,0.12);
  border: 1px solid rgba(233,196,106,0.35);
  color: var(--aib-gold); font-weight: 600;
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  padding: 7px 20px; border-radius: 100px; margin-bottom: 24px;
}
.aib-hero-title {
  font-family: var(--aib-font-display);
  font-size: clamp(2.4rem, 5.5vw, 4rem); font-weight: 700;
  color: var(--aib-white); margin: 0 0 18px;
  line-height: 1.1; letter-spacing: -0.5px;
}
.aib-hero-title span { color: var(--aib-teal); font-style: italic; }
.aib-hero-sub { color: rgba(255,255,255,0.55); font-size: 1rem; font-weight: 300; letter-spacing: 0.3px; }

/* ── Progress ── */
.aib-progress-wrap {
  background: var(--aib-white); padding: 14px 32px;
  display: flex; align-items: center; gap: 16px;
  border-bottom: 1px solid var(--aib-border);
}
.aib-progress-bar { flex: 1; height: 3px; background: var(--aib-sand-d); border-radius: 100px; overflow: hidden; }
.aib-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--aib-teal), var(--aib-coral));
  border-radius: 100px;
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
  width: 14.28%;
}
.aib-step-label { font-size: 12px; font-weight: 500; color: var(--aib-muted); white-space: nowrap; letter-spacing: 0.5px; }

/* ── Steps ── */
.aib-steps-container { background: var(--aib-cream); }
.aib-step { display: none; padding: 52px 36px 44px; max-width: 780px; margin: 0 auto; animation: aib-fade-in 0.4s ease; }
.aib-step.active { display: block; }
@keyframes aib-fade-in { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
.aib-step-icon { font-size: 2rem; margin-bottom: 14px; display: block; }
.aib-step-title {
  font-family: var(--aib-font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 700;
  color: var(--aib-navy); margin: 0 0 6px; letter-spacing: -0.3px;
}
.aib-step-sub { color: var(--aib-muted); font-size: 0.88rem; margin: 0 0 32px; font-weight: 300; }

/* ── Days Grid ── */
.aib-days-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.aib-day-btn {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 88px; height: 88px;
  background: var(--aib-white); border: 1.5px solid var(--aib-sand-d);
  border-radius: var(--aib-radius); transition: all 0.22s ease; gap: 2px;
  box-shadow: var(--aib-shadow);
}
.aib-day-btn:hover { border-color: var(--aib-teal); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(42,157,143,0.18); }
.aib-day-btn.selected { background: var(--aib-teal); border-color: var(--aib-teal); color: var(--aib-white); transform: translateY(-3px); box-shadow: 0 8px 28px rgba(42,157,143,0.35); }
.aib-day-btn.popular { border-color: var(--aib-coral); }
.aib-day-btn.popular.selected { background: var(--aib-coral); border-color: var(--aib-coral); box-shadow: 0 8px 28px rgba(231,111,81,0.35); }
.aib-day-num { font-family: var(--aib-font-display); font-size: 2rem; font-weight: 700; line-height: 1; }
.aib-day-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; opacity: 0.7; font-weight: 500; }
.aib-popular-tag {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--aib-coral); color: white;
  font-size: 8px; font-weight: 700; padding: 2px 10px; border-radius: 100px; white-space: nowrap;
}

/* ── Options Grid ── */
.aib-options-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 10px; margin-bottom: 36px; }
.aib-option-btn {
  display: flex; flex-direction: column; align-items: center;
  padding: 22px 14px; background: var(--aib-white);
  border: 1.5px solid var(--aib-sand-d); border-radius: var(--aib-radius);
  transition: all 0.22s ease; gap: 8px; text-align: center; box-shadow: var(--aib-shadow);
}
.aib-option-btn:hover { border-color: var(--aib-teal); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(42,157,143,0.15); }
.aib-option-btn.selected { background: var(--aib-teal); border-color: var(--aib-teal); color: var(--aib-white); box-shadow: 0 8px 24px rgba(42,157,143,0.3); transform: translateY(-2px); }
.aib-option-icon { font-size: 1.7rem; }
.aib-option-label { font-weight: 600; font-size: 0.85rem; letter-spacing: 0.2px; }
.aib-option-desc { font-size: 0.75rem; opacity: 0.7; font-weight: 300; }
.aib-style-btn { align-items: flex-start; text-align: left; padding: 18px 20px; }
.aib-style-btn .aib-option-icon { font-size: 1.4rem; }

/* ── Interests ── */
.aib-interests-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin-bottom: 36px; }
.aib-interest-btn {
  display: flex; flex-direction: column; align-items: center;
  padding: 18px 10px; background: var(--aib-white);
  border: 1.5px solid var(--aib-sand-d); border-radius: var(--aib-radius);
  transition: all 0.22s ease; gap: 8px; text-align: center; box-shadow: var(--aib-shadow);
}
.aib-interest-btn:hover { border-color: var(--aib-teal); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(42,157,143,0.15); }
.aib-interest-btn.selected { background: var(--aib-teal); border-color: var(--aib-teal); color: var(--aib-white); box-shadow: 0 8px 20px rgba(42,157,143,0.3); transform: translateY(-2px); }
.aib-interest-btn .aib-option-icon { font-size: 1.5rem; }
.aib-interest-btn .aib-option-label { font-size: 0.78rem; font-weight: 600; }

/* ── Nav Buttons ── */
.aib-nav { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.aib-btn-next, .aib-btn-back, .aib-btn-generate { padding: 13px 28px; border-radius: 100px; font-weight: 600; font-size: 0.9rem; letter-spacing: 0.3px; transition: all 0.22s ease; }
.aib-btn-next { background: var(--aib-teal); color: var(--aib-white); box-shadow: 0 4px 16px rgba(42,157,143,0.35); }
.aib-btn-next:hover:not(:disabled) { background: var(--aib-teal-d); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(42,157,143,0.4); }
.aib-btn-next:disabled { opacity: 0.35; cursor: not-allowed; }
.aib-btn-back { background: transparent; color: var(--aib-muted); border: 1.5px solid var(--aib-sand-d); }
.aib-btn-back:hover { border-color: var(--aib-teal); color: var(--aib-teal); }
.aib-btn-generate {
  background: linear-gradient(135deg, var(--aib-coral), var(--aib-coral-d));
  color: var(--aib-white); box-shadow: 0 4px 20px rgba(231,111,81,0.4);
  display: flex; align-items: center; gap: 8px; padding: 15px 32px; font-size: 0.95rem;
}
.aib-btn-generate:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(231,111,81,0.5); }
.aib-btn-generate:disabled { opacity: 0.35; cursor: not-allowed; }
.aib-btn-icon { font-size: 1.1em; }

/* ── Loading ── */
.aib-loading { background: var(--aib-navy); min-height: 420px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 60px 32px; }
.aib-loading-inner { max-width: 400px; }
.aib-spinner { display: flex; align-items: flex-end; justify-content: center; gap: 5px; height: 44px; margin-bottom: 36px; }
.aib-wave { width: 5px; background: linear-gradient(180deg, var(--aib-gold), var(--aib-teal)); border-radius: 100px; animation: aib-wave-anim 1.3s ease-in-out infinite; }
.aib-wave:nth-child(1) { animation-delay: 0s; }
.aib-wave:nth-child(2) { animation-delay: 0.2s; }
.aib-wave:nth-child(3) { animation-delay: 0.4s; }
@keyframes aib-wave-anim { 0%, 100% { height:12px; opacity:0.4; } 50% { height:44px; opacity:1; } }
.aib-loading-title { font-family: var(--aib-font-display); font-size: 1.8rem; font-style: italic; color: var(--aib-white); margin: 0 0 20px; }
.aib-loading-tips { min-height: 28px; }
.aib-tip { color: rgba(255,255,255,0.5); font-size: 0.88rem; font-weight: 300; margin: 0; opacity: 0; position: absolute; width: 100%; transition: opacity 0.6s; }
.aib-tip.active { opacity: 1; position: relative; }

/* ── Results Header ── */
.aib-results-header { position: relative; background: var(--aib-navy); padding: 60px 32px 96px; text-align: center; overflow: hidden; }
.aib-results-header::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 25% 60%, rgba(42,157,143,0.18) 0%, transparent 55%); }
.aib-results-waves { position: absolute; bottom: -1px; left: 0; right: 0; height: 70px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 70'%3E%3Cpath fill='%23faf8f4' d='M0,40 C240,70 480,10 720,40 C960,70 1200,20 1440,40 L1440,70 L0,70 Z'/%3E%3C/svg%3E") center bottom/cover no-repeat; }
.aib-results-header-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.aib-results-title { font-family: var(--aib-font-display); font-size: clamp(1.8rem, 4.5vw, 3rem); font-weight: 700; font-style: italic; color: var(--aib-white); margin: 14px 0 10px; }
.aib-results-summary { color: rgba(255,255,255,0.55); font-size: 0.9rem; font-weight: 300; }

/* ── Action Bar ── */
.aib-action-bar { background: var(--aib-white); border-bottom: 1px solid var(--aib-border); padding: 14px 32px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.aib-action-btn { display: flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 100px; font-weight: 600; font-size: 0.82rem; letter-spacing: 0.3px; background: var(--aib-teal); color: var(--aib-white); transition: all 0.2s; }
.aib-action-btn:hover { background: var(--aib-teal-d); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(42,157,143,0.3); }
.aib-action-secondary { background: var(--aib-white); color: var(--aib-muted); border: 1.5px solid var(--aib-sand-d); }
.aib-action-secondary:hover { border-color: var(--aib-teal); color: var(--aib-teal); transform: none; box-shadow: none; }

/* ── Email Modal ── */
.aib-modal { position: fixed; inset: 0; background: rgba(26,46,59,0.65); backdrop-filter: blur(6px); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px; }
.aib-modal-inner { background: var(--aib-white); border-radius: 20px; padding: 40px; max-width: 420px; width: 100%; box-shadow: var(--aib-shadow-lg); text-align: center; }
.aib-modal-inner h3 { font-family: var(--aib-font-display); font-size: 1.6rem; font-weight: 700; color: var(--aib-navy); margin: 0 0 20px; }
.aib-email-field { width: 100%; padding: 13px 18px; border: 1.5px solid var(--aib-sand-d); border-radius: 100px; font-size: 0.95rem; color: var(--aib-text); margin-bottom: 16px; transition: border-color 0.2s; }
.aib-email-field:focus { border-color: var(--aib-teal); }
.aib-modal-actions { display: flex; gap: 10px; justify-content: center; }
.aib-email-msg { font-size: 0.88rem; margin: 12px 0 0; }
.aib-email-msg.success { color: var(--aib-teal); }
.aib-email-msg.error   { color: var(--aib-coral); }

/* ── Days Container ── */
.aib-days-container { background: var(--aib-cream); padding: 48px 32px; max-width: 960px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }

/* ── Day Card ── */
.aib-day-card { background: var(--aib-white); border-radius: 20px; overflow: hidden; box-shadow: var(--aib-shadow); border: 1px solid var(--aib-border); transition: transform 0.22s, box-shadow 0.22s; }
.aib-day-card:hover { transform: translateY(-2px); box-shadow: var(--aib-shadow-lg); }

/* ── Day Header ── */
.aib-day-header { background: var(--aib-navy); padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.aib-day-header-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.aib-day-num-badge { background: var(--aib-teal); color: var(--aib-white); font-weight: 700; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; padding: 5px 14px; border-radius: 100px; white-space: nowrap; flex-shrink: 0; }
.aib-day-theme { font-family: var(--aib-font-display); font-size: 1.2rem; font-weight: 600; font-style: italic; color: var(--aib-white); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aib-day-regen-btn { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16); color: rgba(255,255,255,0.7); padding: 6px 13px; border-radius: 100px; font-size: 0.72rem; font-weight: 600; transition: all 0.2s; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.aib-day-regen-btn:hover { background: rgba(42,157,143,0.3); color: #fff; }

/* ── Credits bar inside each day ── */
.aib-credits {
  border-top: 1px solid var(--aib-sand-d);
  padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--aib-sand);
}
.aib-credits-text { font-size: 10px; color: var(--aib-muted); line-height: 1.6; }
.aib-credits-text a { color: var(--aib-teal); text-decoration: none; }
.aib-credits-text a:hover { text-decoration: underline; }
/* Logo sits on the light sand background — no filter needed, original colors show correctly */
.aib-credits-logo {
  height: 38px; width: auto;
  flex-shrink: 0;
  display: block;
}

/* ── Time Blocks ── */
.aib-day-body { padding: 22px 24px; }
.aib-time-blocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.aib-time-block { background: var(--aib-cream); border-radius: 11px; padding: 15px; border-left: 3px solid var(--aib-teal); }
.aib-time-block.afternoon { border-color: var(--aib-coral); }
.aib-time-block.evening   { border-color: var(--aib-gold-d); }
.aib-time-label { font-size: 9px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--aib-teal); margin-bottom: 6px; }
.aib-time-block.afternoon .aib-time-label { color: var(--aib-coral); }
.aib-time-block.evening   .aib-time-label { color: var(--aib-gold-d); }
.aib-time-activity { font-weight: 500; font-size: 0.87rem; color: var(--aib-text); margin-bottom: 4px; line-height: 1.4; }
.aib-time-location { font-size: 0.77rem; color: var(--aib-muted); }
.aib-time-tip { font-size: 0.75rem; color: var(--aib-muted); font-style: italic; margin-top: 7px; border-top: 1px solid var(--aib-sand-d); padding-top: 7px; }

/* ── Day Details ── */
.aib-day-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.aib-detail-chip { display: flex; align-items: flex-start; gap: 10px; background: var(--aib-sand); border-radius: 10px; padding: 12px 14px; }
.aib-detail-chip.upgrade { background: #fdf5e8; border: 1px solid rgba(201,162,39,0.2); }
.aib-detail-chip.booking { background: var(--aib-teal-l); border: 1px solid rgba(42,157,143,0.2); }
.aib-detail-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }
.aib-detail-content { flex: 1; min-width: 0; }
.aib-detail-label { font-size: 8px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--aib-muted); margin-bottom: 3px; }
.aib-detail-text { font-size: 0.82rem; color: var(--aib-text); line-height: 1.45; }
.aib-book-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; padding: 5px 14px; background: var(--aib-teal); color: #fff; border-radius: 100px; font-size: 0.74rem; font-weight: 700; text-decoration: none; transition: all 0.2s; }
.aib-book-link:hover { background: var(--aib-teal-d); transform: translateY(-1px); }

/* ── Credits bar inside each day ── */
.aib-credits {
  border-top: 1px solid var(--aib-sand-d);
  padding: 10px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--aib-sand);
}
.aib-credits-text { font-size: 10px; color: var(--aib-muted); line-height: 1.5; }
.aib-credits-text a { color: var(--aib-teal); text-decoration: none; }
.aib-credits-text a:hover { text-decoration: underline; }
.aib-credits-logo { height: 22px; width: auto; opacity: 0.55; filter: grayscale(20%); }

/* ── Bottom CTA ── */
.aib-bottom-cta { background: var(--aib-navy); padding: 64px 32px; text-align: center; }
.aib-cta-inner { max-width: 520px; margin: 0 auto; }
.aib-cta-inner h3 { font-family: var(--aib-font-display); font-size: 2rem; font-weight: 700; font-style: italic; color: var(--aib-white); margin: 0 0 12px; }
.aib-cta-inner p { color: rgba(255,255,255,0.5); margin: 0 0 28px; font-weight: 300; font-size: 0.9rem; }

/* ── Site Footer ── */
.aib-site-footer {
  background: #111e27; padding: 18px 32px;
  text-align: center; font-size: 11px;
  color: rgba(255,255,255,0.28); letter-spacing: 0.5px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.aib-site-footer a { color: rgba(255,255,255,0.42); text-decoration: none; }
.aib-site-footer a:hover { color: var(--aib-teal); }

/* ── Regen Modal ── */
.aib-regen-modal .aib-modal-inner { text-align: left; }
.aib-regen-modal textarea { width: 100%; padding: 12px 16px; border: 1.5px solid var(--aib-sand-d); border-radius: 11px; font-size: 0.9rem; resize: vertical; min-height: 90px; color: var(--aib-text); margin-bottom: 16px; }
.aib-regen-modal textarea:focus { border-color: var(--aib-teal); }

/* ── Error Box ── */
.aib-error-box { background: #fff5f3; border: 1.5px solid #f2a899; border-radius: 12px; padding: 20px 24px; margin: 16px 0; }
.aib-error-box strong { color: var(--aib-coral-d); display: block; margin-bottom: 6px; }
.aib-error-box p { color: #7a3020; font-size: 0.87rem; margin: 0 0 12px; word-break: break-word; }
.aib-error-dismiss { background: var(--aib-coral); color: #fff; border: none; padding: 6px 16px; border-radius: 100px; font-size: 0.78rem; cursor: pointer; font-weight: 600; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .aib-hero { padding: 52px 20px 80px; }
  .aib-step { padding: 36px 20px 32px; }
  .aib-days-grid { gap: 8px; }
  .aib-day-btn { width: 74px; height: 74px; }
  .aib-action-bar { padding: 12px 16px; }
  .aib-days-container { padding: 24px 16px; }
  .aib-day-header { padding: 16px 18px; flex-wrap: wrap; }
  .aib-day-body { padding: 18px; }
  .aib-time-blocks { grid-template-columns: 1fr; }
  .aib-day-details { grid-template-columns: 1fr; }
  .aib-modal-inner { padding: 28px 20px; }
  .aib-modal-actions { flex-direction: column; }
  .aib-day-logo { height: 24px; }
  .aib-credits { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ── Print ── */
@media print {
  .aib-wizard, .aib-loading, .aib-action-bar, .aib-bottom-cta, .aib-site-footer,
  .aib-day-regen-btn { display: none !important; }
  .aib-results { display: block !important; }
  .aib-day-card { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; margin-bottom: 14px; }
  .aib-days-container { padding: 0; gap: 14px; }
  .aib-credits-logo { height: 30px; }
}
