/* ══════════════════════════════════════════════════════════════
   INFO BOX — Bottom-centre slide-up / slide-down panel
   Orange theme · Flaticon icons · BellaVita Cabanatuan Virtual Tour
   ══════════════════════════════════════════════════════════════ */

/* ── Flaticon CDN (solid-rounded + bold-rounded) ── */
@import url("https://cdn-uicons.flaticon.com/2.6.0/uicons-solid-rounded/css/uicons-solid-rounded.css");
@import url("https://cdn-uicons.flaticon.com/2.6.0/uicons-bold-rounded/css/uicons-bold-rounded.css");

/* ── CSS custom properties (orange palette) ── */
:root {
  --ib-orange: #ff6b00;
  --ib-orange-light: #ff8c00;
  --ib-orange-glow: rgba(255, 107, 0, 0.45);
  --ib-white: #ffffff;
  --ib-text: #333333;
  --ib-text-sub: #555555;
  --ib-radius-pill: 50px;
  --ib-radius-panel: 22px 22px 0 0;
  --ib-shadow-btn: 0 4px 18px rgba(255, 107, 0, 0.42);
  --ib-shadow-panel: 0 -6px 32px rgba(0, 0, 0, 0.35);
  --ib-anim-spring: cubic-bezier(0.34, 1.56, 0.64, 1); /* spring up  */
  --ib-anim-close: cubic-bezier(0.4, 0, 0.2, 1); /* ease close */
}

/* ══════════════════════════════════════════════
   1. TOGGLE BUTTON  (fixed · bottom-centre)
   ══════════════════════════════════════════════ */
#info-box-toggle {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: linear-gradient(135deg, var(--ib-orange), var(--ib-orange-light));
  border: none;
  border-radius: var(--ib-radius-pill);
  cursor: pointer;
  z-index: 1100;
  box-shadow: var(--ib-shadow-btn);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--ib-white);
  transition:
    background 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease,
    opacity 0.3s ease;
  /* Spring entrance */
  animation: ib-btn-enter 0.5s var(--ib-anim-spring) both;
}

@keyframes ib-btn-enter {
  from {
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

#info-box-toggle i {
  font-size: 20px;
  line-height: 1;
}

#info-box-toggle:hover {
  background: linear-gradient(135deg, var(--ib-orange-light), #ffa040);
  box-shadow: 0 6px 24px rgba(255, 107, 0, 0.55);
  transform: translateX(-50%) translateY(-3px);
}

#info-box-toggle:active {
  transform: translateX(-50%) translateY(-1px);
  box-shadow: 0 2px 10px rgba(255, 107, 0, 0.4);
}

/* Fade-out when the panel is open */
#info-box-toggle.faded {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(6px);
}

#info-box-toggle.hidden {
  display: none !important;
}

/* ══════════════════════════════════════════════
   2. PANEL  (slides up from bottom)
   · pointer-events only on the card itself so the
     panorama remains fully interactive behind it
   ══════════════════════════════════════════════ */
#info-box {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(110%); /* hidden below viewport */
  width: 92%;
  max-width: 620px;
  max-height: 62vh;
  overflow-y: auto;
  background: var(--ib-white);
  border-radius: var(--ib-radius-panel);
  box-shadow: var(--ib-shadow-panel);
  padding: 32px 32px 28px;
  z-index: 1200;
  transition: transform 0.42s var(--ib-anim-spring);
  will-change: transform;
}

/* ── OPEN  → pull upward ── */
#info-box.visible {
  transform: translateX(-50%) translateY(0);
}

/* Decorative top accent stripe */
#info-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--ib-orange),
    var(--ib-orange-light),
    #ffbb55
  );
  border-radius: 22px 22px 0 0;
}

/* ── Custom scrollbar ── */
#info-box::-webkit-scrollbar {
  width: 6px;
}
#info-box::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 10px;
}
#info-box::-webkit-scrollbar-thumb {
  background: var(--ib-orange);
  border-radius: 10px;
}
#info-box::-webkit-scrollbar-thumb:hover {
  background: var(--ib-orange-light);
}

/* ══════════════════════════════════════════════
   3. CLOSE BUTTON  (top-right of panel)
   ══════════════════════════════════════════════ */
#info-box-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 107, 0, 0.08);
  border: 1.5px solid rgba(255, 107, 0, 0.2);
  border-radius: 50%;
  cursor: pointer;
  color: var(--ib-orange);
  font-size: 0; /* icon size set below */
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
  z-index: 1201;
}

#info-box-close i {
  font-size: 18px;
  line-height: 1;
  display: block;
}

#info-box-close:hover {
  background: var(--ib-orange);
  border-color: var(--ib-orange);
  color: var(--ib-white);
  transform: rotate(90deg);
}

#info-box-close:active {
  transform: rotate(90deg) scale(0.9);
}

/* ══════════════════════════════════════════════
   4. PANEL CONTENT
   ══════════════════════════════════════════════ */
.info-box-content {
  margin-top: 10px;
}

/* ── Title ── */
.info-box-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--ib-text);
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 2.5px solid var(--ib-orange);
  line-height: 1.2;
}

.info-box-title i {
  color: var(--ib-orange);
  font-size: 26px;
  flex-shrink: 0;
}

/* ── Description ── */
.info-box-description {
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--ib-text-sub);
  text-align: justify;
  margin: 0;
}

/* ══════════════════════════════════════════════
   5. HIDE DURING INTRO
   ══════════════════════════════════════════════ */
body.intro-active #info-box-toggle,
body.intro-active #info-box {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ══════════════════════════════════════════════
   6. RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {
  #info-box {
    width: 96%;
    padding: 26px 20px 22px;
    max-height: 68vh;
  }

  #info-box-toggle {
    bottom: 18px;
    padding: 11px 22px;
    font-size: 14px;
  }

  #info-box-toggle i {
    font-size: 17px;
  }

  .info-box-title {
    font-size: 18px;
  }
  .info-box-title i {
    font-size: 22px;
  }
  .info-box-description {
    font-size: 14px;
    line-height: 1.7;
  }

  #info-box-close {
    width: 34px;
    height: 34px;
  }
  #info-box-close i {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  #info-box {
    width: 100%;
    border-radius: 18px 18px 0 0;
    padding: 22px 16px 18px;
  }

  #info-box-toggle {
    bottom: 12px;
    padding: 9px 18px;
    font-size: 13px;
  }

  .info-box-title {
    font-size: 16px;
  }
  .info-box-description {
    font-size: 13px;
  }
}
