/* ============================================================
   Safari Booking Madagascar — booking.css  v1.2.0
   ============================================================ */

#stm-trigger {
  position: fixed;
  bottom: 32px;
  left: 32px;
  z-index: 9998;
  background: #1a120a;
  color: #c8a96e;
  border: 1px solid rgba(200,169,110,0.4);
  border-radius: 50px;
  padding: 13px 22px 13px 16px;
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  transition: all 0.3s ease;
  animation: stmSlideUp 0.6s 2.5s cubic-bezier(0.16,1,0.3,1) both;
}
#stm-trigger:hover {
  background: #c8a96e;
  color: #1a120a;
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(200,169,110,0.3);
}
#stm-trigger:hover .stm-icon-svg path,
#stm-trigger:hover .stm-icon-svg circle,
#stm-trigger:hover .stm-icon-svg line,
#stm-trigger:hover .stm-icon-svg polyline {
  stroke: #1a120a;
}

/* Pro SVG icon wrapper */
.stm-icon-wrap {
  width: 28px;
  height: 28px;
  background: rgba(200,169,110,0.15);
  border: 1px solid rgba(200,169,110,0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.3s;
}
#stm-trigger:hover .stm-icon-wrap {
  background: rgba(26,18,10,0.15);
  border-color: rgba(26,18,10,0.3);
}
.stm-icon-svg {
  width: 14px;
  height: 14px;
}
.stm-icon-svg path,
.stm-icon-svg circle,
.stm-icon-svg line,
.stm-icon-svg polyline {
  stroke: #c8a96e;
  transition: stroke 0.3s;
}

/* Position variant — right */
body.stm-pos-right #stm-trigger {
  left: auto;
  right: 32px;
}

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

/* ── Overlay ── */
#stm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16,10,4,0.72);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
#stm-overlay.stm-open {
  opacity: 1;
  pointer-events: all;
}

/* ── Modal ── */
#stm-modal {
  background: #faf7f2;
  border-radius: 8px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(24px) scale(0.97);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
}
#stm-overlay.stm-open #stm-modal {
  transform: translateY(0) scale(1);
}

/* ── Header ── */
.stm-modal-header {
  background: #1a120a;
  padding: 36px 36px 28px;
  position: relative;
}
.stm-modal-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,169,110,0.5), transparent);
}
.stm-eyebrow {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #c8a96e;
  margin-bottom: 10px;
  font-weight: 400;
  font-family: 'Jost', sans-serif;
}
.stm-modal-header h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.9rem;
  font-weight: 300;
  color: #f0e6d0;
  line-height: 1.2;
}
.stm-modal-header p {
  color: rgba(240,230,208,0.5);
  font-size: 12px;
  margin-top: 8px;
  font-weight: 300;
  letter-spacing: 0.5px;
  font-family: 'Jost', sans-serif;
}
.stm-close {
  position: absolute;
  top: 20px; right: 20px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #c8a96e;
  width: 34px; height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  line-height: 1;
  font-family: sans-serif;
}
.stm-close:hover { background: rgba(200,169,110,0.2); }

/* ── Body ── */
.stm-body { padding: 32px 36px 36px; }
.stm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stm-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.stm-field.stm-full { grid-column: 1 / -1; }
.stm-field label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #7a6248;
  font-weight: 500;
  font-family: 'Jost', sans-serif;
}
.stm-field input,
.stm-field select,
.stm-field textarea {
  background: #fff;
  border: 1px solid #e0d5c5;
  border-radius: 4px;
  padding: 11px 14px;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  font-weight: 300;
  color: #2a1f14;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
  box-sizing: border-box;
}
.stm-field input:focus,
.stm-field select:focus,
.stm-field textarea:focus {
  border-color: #c8a96e;
  box-shadow: 0 0 0 3px rgba(200,169,110,0.1);
}
.stm-field textarea { resize: vertical; min-height: 80px; }
.stm-field select { appearance: none; cursor: pointer; }
.stm-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #e0d5c5, transparent);
  margin: 8px 0 24px;
}

/* ── Submit ── */
.stm-submit {
  width: 100%;
  background: #1a120a;
  color: #c8a96e;
  border: none;
  border-radius: 4px;
  padding: 16px;
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 8px;
}
.stm-submit:hover { background: #c8a96e; color: #1a120a; letter-spacing: 4px; }
.stm-submit:disabled { opacity: 0.5; cursor: not-allowed; letter-spacing: 3px; }
.stm-note {
  text-align: center;
  font-size: 11px;
  color: #9a8570;
  margin-top: 14px;
  font-weight: 300;
  font-family: 'Jost', sans-serif;
}
.stm-note span { color: #c8a96e; }
.stm-error-msg {
  background: #fff0f0;
  border: 1px solid #e8c0b0;
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 12px;
  color: #8b3a2a;
  margin-bottom: 16px;
  display: none;
  font-family: 'Jost', sans-serif;
}

/* ── Success ── */
.stm-success {
  display: none;
  text-align: center;
  padding: 48px 36px;
}
.stm-success-icon {
  width: 60px; height: 60px;
  background: #f0e6d0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.stm-success-icon svg { width: 28px; height: 28px; }
.stm-success h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 300;
  color: #1a120a;
  margin-bottom: 10px;
}
.stm-success p {
  color: #7a6248;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.7;
  font-family: 'Jost', sans-serif;
}
.stm-confirm-email {
  background: #f0e6d0;
  border-radius: 4px;
  padding: 12px 20px;
  margin: 20px auto 0;
  font-size: 12px;
  color: #5a3e1b;
  letter-spacing: 1px;
  max-width: 300px;
  font-family: 'Jost', sans-serif;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .stm-row { grid-template-columns: 1fr; }
  .stm-modal-header, .stm-body { padding-left: 24px; padding-right: 24px; }
  #stm-trigger { bottom: 20px; left: 20px; padding: 11px 16px 11px 12px; }
  body.stm-pos-right #stm-trigger { left: auto; right: 20px; }
}
