/* assets/css/footer.css - Footer & iOS Bottom Navigation Bar */

.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 48px 0 30px 0;
  margin-top: 40px;
  position: relative;
  z-index: 10;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 36px;
}

.footer-brand .logo {
  margin-bottom: 14px;
}

.footer-desc {
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: 380px;
  margin-bottom: 18px;
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.social-btn:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 12px var(--primary-glow);
  transform: translateY(-2px);
}

.footer-col-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 18px;
  position: relative;
  display: inline-block;
}

.footer-col-title::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--secondary);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  color: var(--text-muted);
  font-size: 0.88rem;
  transition: all var(--transition-fast);
}

.footer-link:hover {
  color: var(--secondary);
  padding-left: 6px;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 0.82rem;
}

/* =========================================
   IOS BOTTOM NAVIGATION BAR (MOBILE ONLY)
   ========================================= */
.ios-bottom-bar {
  display: none !important; /* Mặc định ẩn hoàn toàn trên Desktop / Laptop / Màn hình lớn (> 768px) */
}

@media (min-width: 769px) and (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
  }
  .footer-col:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  /* Extra bottom padding on mobile body & footer so footer isn't covered by bottom nav */
  body {
    padding-bottom: 90px !important;
  }

  .site-footer {
    padding-top: 36px;
    padding-bottom: 125px !important; /* Đảm bảo không bị che bởi thanh điều hướng iOS fixed 60px */
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 28px 16px;
  }

  .footer-brand,
  .footer-col:last-child {
    grid-column: 1 / -1;
  }

  .footer-col {
    position: relative;
    z-index: 5;
    min-width: 0;
  }

  .footer-col-title {
    font-size: 1.05rem;
    margin-bottom: 14px;
  }

  .footer-links {
    gap: 12px;
  }

  .footer-link {
    font-size: 0.88rem;
    word-break: break-word;
    display: inline-flex;
    align-items: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
    padding-top: 20px;
    padding-bottom: 10px;
  }

  /* iOS Bar styling - CHỈ HIỂN THỊ TRÊN GIAO DIỆN MOBILE <= 768px */
  .ios-bottom-bar {
    display: block !important;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(14, 18, 28, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .ios-nav-list {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 60px;
    padding: 0 10px;
  }

  .ios-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    position: relative;
  }

  .ios-nav-item i {
    font-size: 1.25rem;
    transition: transform var(--transition-fast);
  }

  .ios-nav-item.active {
    color: #fff;
  }

  .ios-nav-item.active i {
    color: var(--secondary);
    transform: translateY(-2px);
    filter: drop-shadow(0 0 8px var(--secondary-glow));
  }

  .ios-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    background: var(--secondary);
    border-radius: 50%;
  }
}

@media (max-width: 480px) {
  .site-footer {
    padding-bottom: 135px !important;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* =========================================
   IOS BOTTOM SHEET MODAL (CỬA SỔ NỔI TRƯỢT TỪ DƯỚI LÊN)
   ========================================= */
.ios-bottom-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
}

.ios-bottom-sheet-overlay.active {
  opacity: 1;
  visibility: visible;
}

.ios-bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  background: #121624;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -12px 45px rgba(0, 0, 0, 0.8), 0 0 20px rgba(139, 92, 246, 0.2);
  z-index: 10001;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  padding: 14px 20px calc(24px + env(safe-area-inset-bottom, 0px)) 20px;
  box-sizing: border-box;
}

.ios-bottom-sheet-overlay.active .ios-bottom-sheet {
  transform: translateY(0);
}

.ios-sheet-handle {
  flex-shrink: 0;
  width: 44px;
  height: 5px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  margin: 0 auto 16px auto;
  cursor: pointer;
}

.ios-sheet-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ios-sheet-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.ios-sheet-title i {
  color: var(--secondary);
  font-size: 1.2rem;
}

.ios-sheet-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.ios-sheet-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

/* THÂN CỬA SỔ NỔI: CUỘN SIÊU MƯỢT TRÊN MỌI ĐIỆN THOẠI */
.ios-sheet-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding-right: 4px;
  padding-bottom: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.4) transparent;
}

.ios-sheet-body::-webkit-scrollbar {
  width: 5px;
}
.ios-sheet-body::-webkit-scrollbar-track {
  background: transparent;
}
.ios-sheet-body::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.4);
  border-radius: 999px;
}

.ios-days-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding-bottom: 6px;
}

.ios-day-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.ios-day-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: var(--primary);
}

.ios-day-btn.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(6, 182, 212, 0.35));
  border-color: var(--secondary);
  color: #fff;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
}

.ios-day-btn.is-today::after {
  content: 'Hôm nay';
  position: absolute;
  top: -7px;
  right: 8px;
  background: var(--danger);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5);
}

/* =========================================
   CHI TIẾT BOTTOM SHEET DANH MỤC & BỘ LỌC PHIM
   ========================================= */
.filter-sheet-group {
  margin-bottom: 20px;
}

.filter-sheet-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.filter-sheet-label i {
  color: var(--secondary);
  font-size: 0.9rem;
}

.filter-sheet-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-sheet-btn {
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-sheet-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary);
  color: #fff;
}

.filter-sheet-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 10px var(--primary-glow);
}

.filter-sheet-actions {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.filter-sheet-apply-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--primary-glow);
  transition: all var(--transition-fast);
}

.filter-sheet-apply-btn:hover {
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
  transform: translateY(-2px);
}


