/* ================================================
   MANARE RESIDENCE — Fixed Right Sidebar
   ================================================ */

.sidebar {
  position: fixed;
  right: 0;
  top: 0;
  height: 100vh;
  z-index: 900;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ---------- Individual Sidebar Item ---------- */
.sidebar__item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* ---------- Icon Button ---------- */
.sidebar__icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(40, 56, 90, 0.08);
  cursor: pointer;
  transition: background 0.3s ease;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.sidebar__item:first-child .sidebar__icon {
  border-radius: 0;
}

.sidebar__item:last-child .sidebar__icon {
  border-bottom: none;
}

.sidebar__icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--color-blue-dark);
  stroke-width: 1.5;
  fill: none;
  transition: stroke 0.3s ease;
}

/* Icons that use fill instead of stroke */
.sidebar__icon svg.fill-icon {
  fill: var(--color-blue-dark);
  stroke: none;
  width: 20px;
  height: 20px;
}

.sidebar__icon:hover {
  background: rgba(255, 255, 255, 1);
}

/* ---------- Expanding Label (slides out from behind the icon) ---------- */
.sidebar__label {
  position: absolute;
  right: 52px;
  top: 0;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  padding: 0 1.2rem;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid rgba(40, 56, 90, 0.08);

  font-family: var(--font-primary);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-blue-dark);
  letter-spacing: 0.02em;

  /* Hidden state */
  opacity: 0;
  transform: translateX(20px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.sidebar__item:hover .sidebar__label {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

/* ---------- Contact Popup (for the agent button) ---------- */
.sidebar__contact-popup {
  position: absolute;
  right: 52px;
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 8px 32px rgba(40, 56, 90, 0.15);
  border: 1px solid rgba(40, 56, 90, 0.08);
  min-width: 220px;
  z-index: 10;

  /* Hidden state */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.sidebar__item:hover .sidebar__contact-popup {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
  pointer-events: auto;
}

.sidebar__contact-header {
  padding: 0.85rem 1.2rem;
  font-family: var(--font-primary);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-blue-dark);
  border-bottom: 1px solid rgba(40, 56, 90, 0.08);
}

.sidebar__contact-list {
  list-style: none;
  padding: 0.4rem 0;
  margin: 0;
}

.sidebar__contact-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.2rem;
  font-family: var(--font-primary);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--color-blue-dark);
  text-decoration: none;
  transition: background 0.25s ease;
}

.sidebar__contact-link:hover {
  background: rgba(40, 56, 90, 0.04);
}

.sidebar__contact-link svg {
  width: 18px;
  height: 18px;
  stroke: var(--color-blue-dark);
  stroke-width: 1.5;
  fill: none;
  flex-shrink: 0;
}

.sidebar__contact-link svg.fill-icon {
  fill: var(--color-blue-dark);
  stroke: none;
  width: 17px;
  height: 17px;
}

/* ---------- Shadow effect on the whole sidebar ---------- */
.sidebar {
  box-shadow: -4px 0 20px rgba(40, 56, 90, 0.08);
}

/* ---------- Phone number in contact popup ---------- */
.sidebar__contact-number {
  font-weight: 500;
  margin-left: 0.15em;
}

/* ---------- Responsive: hide sidebar on mobile ---------- */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
}
