/* Athalaia Chat - Premium Social Network & Mobile UI Styles */

/* Social Main Container Overlay Rule - Takes 100% of .chat-main area */
#social-main-container {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 100 !important;
  background: var(--bg-main, #0b1120) !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

#social-main-container[style*="display: none"],
#social-main-container[style*="display:none"] {
  display: none !important;
}

#social-main-container::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

.social-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--text-secondary, #94a3b8);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.social-nav-item:hover, .social-nav-item.active {
  background: rgba(37, 99, 235, 0.15);
  color: #38bdf8;
}

/* Feed Container */
.social-container {
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px;
  box-sizing: border-box;
}

.social-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.social-header-title h2 {
  margin: 0;
  color: #f8fafc;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.social-header-title p {
  margin: 4px 0 0 0;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
}

.mobile-social-back-btn {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .mobile-social-back-btn {
    display: inline-flex;
    align-items: center;
  }
}

.social-create-post-btn {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  border: none !important;
  padding: 10px 24px !important;
  border-radius: 30px !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  width: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4), 0 0 20px rgba(37, 99, 235, 0.2) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.social-create-post-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6), 0 0 25px rgba(56, 189, 248, 0.4) !important;
}

.social-header-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.social-tab-btn {
  padding: 10px 20px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.2);
}

.social-tab-btn.active {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

/* Premium Card Design (Inspired by Athalink Mobile UI) */
.social-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 1px solid rgba(0, 210, 255, 0.15);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 20px rgba(37, 99, 235, 0.1);
  backdrop-filter: blur(12px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.social-card:hover {
  border-color: rgba(0, 210, 255, 0.3);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), 0 0 25px rgba(37, 99, 235, 0.2);
}

.social-card-author {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.social-author-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.social-author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #2563eb;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
}

.social-author-meta h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-badge-inst {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #fff;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

.social-author-handle {
  font-size: 13px;
  color: #38bdf8;
  font-weight: 500;
}

.social-card-content {
  font-size: 15px;
  line-height: 1.6;
  color: #e2e8f0;
  margin-bottom: 16px;
}

/* Media Container with Responsive Image & Video Proportions */
.social-media-wrapper {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
  background: #070a14;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.social-card-media {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  display: block;
  border-radius: 16px;
  background: #070a14;
}

/* Horizontal / Landscape Media */
.social-media-wrapper.is-horizontal-media,
.social-media-wrapper:not(.is-vertical-media) {
  width: 100%;
}

.social-media-wrapper.is-horizontal-media img.social-card-media,
.social-media-wrapper:not(.is-vertical-media) img.social-card-media {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 16px;
}

.social-media-wrapper.is-horizontal-media video.social-card-media,
.social-media-wrapper:not(.is-vertical-media) video.social-card-media {
  width: 100%;
  max-height: 480px;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
  border-radius: 16px;
}

/* Vertical / Portrait Media (9:16 format) */
.social-media-wrapper.is-vertical-media {
  max-width: 420px !important;
  margin: 0 auto 16px auto !important;
  border-radius: 20px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
  aspect-ratio: 9 / 16 !important;
}

.social-media-wrapper.is-vertical-media img.social-card-media {
  width: 100% !important;
  max-height: 620px !important;
  object-fit: cover !important;
  border-radius: 20px !important;
}

.social-media-wrapper.is-vertical-media video.social-card-media {
  width: 100% !important;
  max-height: 620px !important;
  aspect-ratio: 9 / 16 !important;
  object-fit: cover !important;
  border-radius: 20px !important;
  background: #000 !important;
}

.social-media-overlay-title {
  position: absolute;
  bottom: 0;
  inset-x: 0;
  padding: 30px 20px 16px;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, transparent 100%);
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* Action Pill Bar */
.social-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.social-action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.2s ease;
}

.social-action-btn:hover {
  background: rgba(37, 99, 235, 0.2);
  color: #38bdf8;
  border-color: #2563eb;
}

.social-action-btn.liked {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: #ef4444;
}

.social-action-btn.saved {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border-color: #f59e0b;
}

/* Communities & Sectors Card List (Inspired by Right Screen) */
.community-section-title {
  font-size: 18px;
  font-weight: 800;
  color: #f8fafc;
  margin: 24px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.community-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
}

.community-card:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2) 0%, rgba(15, 23, 42, 0.95) 100%);
  border-color: #2563eb;
  transform: translateX(4px);
}

.community-card-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.community-icon-badge {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.community-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 2px;
}

.community-card-meta {
  font-size: 12px;
  color: #94a3b8;
}

.community-chevron {
  color: #64748b;
  font-size: 18px;
  font-weight: 700;
}

/* Vertical Video Reel Player */
.vertical-reels-overlay {
  position: fixed;
  inset: 0;
  background: #000000;
  z-index: 99900;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.reels-container {
  width: 100%;
  max-width: 420px;
  height: 100vh;
  position: relative;
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  scrollbar-width: none;
}

.reels-slide {
  width: 100%;
  height: 100vh;
  scroll-snap-align: start;
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reels-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reels-overlay-info {
  position: absolute;
  bottom: 30px;
  left: 16px;
  right: 70px;
  color: #ffffff;
  z-index: 10;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.reels-actions-bar {
  position: absolute;
  right: 12px;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  z-index: 10;
}

.reels-action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #ffffff;
  cursor: pointer;
}

.reels-action-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: 1px solid rgba(255,255,255,0.2);
}

/* Profile Page Header */
.profile-page-header {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid rgba(0, 210, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.profile-cover {
  height: 190px;
  background: linear-gradient(135deg, #0f172a 0%, #2563eb 50%, #f97316 100%);
  position: relative;
}

.profile-avatar-wrap {
  position: relative;
  margin-top: -65px;
  padding: 0 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.profile-avatar-img {
  width: 115px;
  height: 115px;
  border-radius: 50%;
  border: 4px solid #1e293b;
  object-fit: cover;
  background: #0f172a;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}

.profile-meta-block {
  padding: 18px 24px 24px;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-name-row h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: #f8fafc;
}

.profile-handle-tag {
  color: #38bdf8;
  font-weight: 600;
  font-size: 15px;
}

.profile-bio-text {
  margin: 12px 0;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.5;
}

.profile-stats-row {
  display: flex;
  gap: 28px;
  margin-top: 16px;
}

.profile-stat-item {
  display: flex;
  flex-direction: column;
}

.profile-stat-val {
  font-size: 20px;
  font-weight: 800;
  color: #f8fafc;
}

.profile-stat-lbl {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}
