/* ==========================================================================
   MOBILE-FIRST NAVIGATIONS & INTERACTION SPECIFIC STYLES
   ========================================================================== */

/* Mobile Top Header */
.mobile-header {
  position: sticky;
  top: 0;
  z-index: 990;
  height: var(--mobile-header-height);
  background-color: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.mobile-header .brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary-color);
}

.mobile-header .header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  background: var(--bg-color);
  transition: all 0.2s ease;
}

.icon-btn:active {
  background: var(--border-color);
  transform: scale(0.95);
}

/* Mobile Search Bar Shortcut */
.search-bar-trigger {
  width: 100%;
  height: 48px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

/* Fixed Bottom Navigation (Mobile Mandatory Requirement) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
  background-color: var(--surface-color);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: var(--safe-area-bottom);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  height: 100%;
  min-height: 44px;
  color: var(--text-muted);
  font-size: 0.725rem;
  font-weight: 500;
  transition: color 0.2s ease, transform 0.15s ease;
  position: relative;
}

.bottom-nav-item svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
  transition: stroke 0.2s ease, transform 0.2s ease;
}

.bottom-nav-item.active {
  color: var(--primary-color);
  font-weight: 700;
}

.bottom-nav-item.active svg {
  stroke: var(--primary-color);
  transform: translateY(-2px);
}

.bottom-nav-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  width: 24px;
  height: 3px;
  background-color: var(--primary-color);
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}

/* Desktop Hide Bottom Nav */
@media (min-width: 992px) {
  .bottom-nav, .mobile-header {
    display: none !important;
  }
}

/* Horizontal Scroll Containers */
.scroll-horizontal {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding: 4px 16px 12px 16px;
  margin: 0 -16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.scroll-horizontal::-webkit-scrollbar {
  display: none;
}

/* Mobile Bottom Sheet Modal Filter */
.bottom-sheet-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.bottom-sheet-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 88vh;
  background: var(--surface-color);
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  z-index: 1060;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
}

.bottom-sheet.show {
  transform: translateY(0);
}

.bottom-sheet-header {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.bottom-sheet-handle {
  width: 40px;
  height: 5px;
  background: var(--border-color);
  border-radius: var(--radius-full);
  margin: 0 auto 8px auto;
}

.bottom-sheet-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.bottom-sheet-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 12px;
  background: var(--surface-color);
}

/* Sticky Contact Bar for Mobile Detail Page */
.sticky-contact-bar {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
  left: 0;
  right: 0;
  background: var(--surface-color);
  border-top: 1px solid var(--border-color);
  padding: 12px 16px;
  z-index: 980;
  box-shadow: 0 -4px 10px rgba(0,0,0,0.08);
  display: flex;
  gap: 10px;
}

@media (min-width: 992px) {
  .sticky-contact-bar {
    display: none !important;
  }
}

/* Touch Friendly Input Sizes */
input, select, textarea {
  font-size: 16px !important; /* Prevents auto zoom on iOS Safari */
  min-height: 48px;
}

/* Agent Slider Mobile */
@media (max-width: 768px) {
  .agent-slider-mobile {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    gap: 8px !important; /* Kurangi jarak antar card */
    padding-bottom: 12px;
    margin-right: -20px; /* Bleed out edge */
    padding-right: 20px;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .agent-slider-mobile::-webkit-scrollbar {
    display: none;
  }
  .agent-slider-mobile > div {
    flex: 0 0 auto;
    width: 160px; /* Lebar lebih compact */
    scroll-snap-align: start;
    padding: 12px !important; /* Padding lebih kecil */
  }
}

