/*
 * GOLPOOGRO - Component: Followers/Following Premium Fullscreen Modal
 * Beautiful glassmorphic frosting, native slide-up transitions, and tactile touch panels
 */

.social-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 12, 22, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-modal-sheet {
  position: relative;
  width: 100%;
  max-width: 680px;
  height: 85vh;
  background: rgba(14, 20, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: none;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.1, 0.76, 0.55, 0.94);
}

/* Tactile Drag indicator for native desktop and touch gesture support */
.modal-drag-indicator {
  width: 100%;
  padding: 12px 0 6px 0;
  cursor: grab;
  display: flex;
  justify-content: center;
  user-select: none;
}

.modal-drag-indicator:active {
  cursor: grabbing;
}

.modal-drag-indicator .drag-bar {
  width: 44px;
  height: 5px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  transition: background 0.2s ease;
}

.modal-drag-indicator:hover .drag-bar {
  background: rgba(255, 255, 255, 0.3);
}

/* Modal header content tab states */
.social-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 24px 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.social-header-states {
  display: flex;
  gap: 16px;
  align-items: center;
}

.sheet-tab-btn {
  background: none;
  border: none;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  position: relative;
  transition: color 0.3s ease;
}

.sheet-tab-btn.active {
  color: #ffffff;
  font-weight: 600;
}

.sheet-tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: -16px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-gold, #eab308);
  border-radius: 99px;
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.4);
}

.tab-count-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.78rem;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  margin-left: 4px;
}

.sheet-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: none;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.3s ease;
}

.sheet-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* Modal Search and Sort Section elements */
.social-search-bar-row {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  background: rgba(10, 15, 25, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.social-search-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.social-search-input-wrap .search-ico {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

.social-search-field {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 10px 40px 10px 42px;
  color: #ffffff;
  font-size: 0.88rem;
  outline: none;
  transition: all 0.3s ease;
}

.social-search-field:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

.clear-search-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}

.clear-search-btn:hover {
  color: #ffffff;
}

.social-sort-dropdown-wrap {
  display: flex;
  align-items: center;
}

.social-sort-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
  transition: background 0.2s;
}

.social-sort-select:focus {
  border-color: rgba(255, 255, 255, 0.2);
}

/* Infinite Scroll Lists */
.social-modal-scroll-area {
  flex: 1;
  padding: 16px 24px 32px 24px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 191, 0, 0.1) transparent;
}

.social-modal-scroll-area::-webkit-scrollbar {
  width: 6px;
}

.social-modal-scroll-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.scroller-loading-spin {
  padding: 40px 0;
}

.social-empty-state-list {
  flex-direction: column;
  padding: 60px 20px;
  text-align: center;
}

.empty-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.social-empty-state-list h3 {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  margin-bottom: 6px;
}

.social-empty-state-list p {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.82rem;
  max-width: 250px;
}

/* Animations declarations */
.anim-fade-in {
  animation: modalOverlayFadeIn 0.4s ease forwards;
}

.anim-fade-out {
  animation: modalOverlayFadeOut 0.4s ease forwards;
}

.anim-slide-up {
  animation: modalSheetSlideUp 0.42s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.anim-slide-down {
  animation: modalSheetSlideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalOverlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalOverlayFadeOut {
  from { opacity: 1; }
  to { opacity: 0; pointer-events: none; }
}

@keyframes modalSheetSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes modalSheetSlideDown {
  from { transform: translateY(0); }
  to { transform: translateY(100%); }
}

/* Responsive adjustment rules (Instagram style - centered on desktop, bottom sheet on mobile) */
@media (min-width: 768px) {
  .social-modal-overlay {
    align-items: center; /* Center vertically on desktop */
  }
  
  .social-modal-sheet {
    height: 650px;
    max-height: 80vh;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px; /* Fully rounded on desktop */
    transform: scale(0.95) translateY(0);
  }

  /* When the sheet slides up on desktop, let's use a subtle zoom in instead of full 100% translation */
  .anim-slide-up {
    animation: modalSheetZoomIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  
  .anim-slide-down {
    animation: modalSheetZoomOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  @keyframes modalSheetZoomIn {
    from { 
      opacity: 0;
      transform: scale(0.95);
    }
    to { 
      opacity: 1;
      transform: scale(1);
    }
  }

  @keyframes modalSheetZoomOut {
    from { 
      opacity: 1;
      transform: scale(1);
    }
    to { 
      opacity: 0;
      transform: scale(0.95);
    }
  }
}

@media (max-width: 767px) {
  .social-modal-sheet {
    height: 85vh;
    border-radius: 28px 28px 0 0;
    border-bottom: none;
  }
}

@media (max-width: 576px) {
  .social-modal-sheet {
    height: 94vh;
  }
  .social-search-bar-row {
    padding: 12px 16px;
  }
}
