/* ========================
   Glassmorphism News Feed
   ======================== */

.glass-modal {
  background: rgba(20, 20, 35, 0.4) !important;
  backdrop-filter: blur(25px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5) !important;
}

.glass-header {
  background: rgba(255, 255, 255, 0.04) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Modal Content Adjustments */
#memberNewsModal .news-feed-modal-content {
  width: 90%;
  max-width: 600px;
  height: 90vh;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#memberNewsModal .news-feed-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-left h2 {
  font-size: 20px;
  color: #fff;
  background: linear-gradient(135deg, #00d2ff, #3a7bd5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

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

.btn-news-filter {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: #aaa;
  padding: 6px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-news-filter.active, .btn-news-filter:hover {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.2), rgba(58, 123, 213, 0.2));
  border-color: #00d2ff;
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

.btn-create-post {
  background: linear-gradient(135deg, #00d2ff, #3a7bd5);
  border: none;
  color: #fff;
  padding: 6px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
  transition: transform 0.2s;
}
.btn-create-post:hover { transform: translateY(-2px); }

/* Hide scrollbars completely as per request */
.no-scrollbar {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.no-scrollbar::-webkit-scrollbar {
  display: none !important;
}

/* ========================
   Publish Form Section
   ======================== */

.publish-section {
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255,255,255,0.05);
}
.publish-section h3 {
  text-align: center;
  color: #00d2ff;
  font-size: 16px;
  margin-top: 0;
  margin-bottom: 15px;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}
.publish-section textarea {
  width: 100%;
  height: 80px;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 12px;
  color: #fff;
  resize: none;
  font-size: 14px;
  box-sizing: border-box;
}
.upload-area {
  margin-top: 10px;
  border: 2px dashed rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  color: #bbb;
  transition: 0.2s;
}
.upload-area:hover { border-color: #00d2ff; background: rgba(0,210,255,0.02); }

.upload-preview {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
}
.upload-preview img {
  width: 60px; height: 60px; object-fit: cover; border-radius: 10px; border: 1px solid rgba(255,255,255,0.1);
}

.sticky-options {
  margin-top: 12px;
  background: rgba(0,0,0,0.15);
  padding: 10px;
  border-radius: 10px;
}
.checkbox-label {
  display: flex; align-items: center; gap: 8px; cursor: pointer; color: #ddd; font-size: 13px;
}
.checkbox-label input { display: none; }
.custom-checkbox {
  width: 18px; height: 18px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.04); position: relative; transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.checkbox-label input:checked + .custom-checkbox {
  background: linear-gradient(135deg, #00d2ff, #0088ff); border-color: #00d2ff;
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.5);
}
.custom-checkbox::after {
  content: '✓'; position: absolute; top: 48%; left: 50%; transform: translate(-50%, -50%) scale(0.5);
  color: #fff; font-weight: 800; font-size: 11px; opacity: 0; transition: transform 0.2s;
}
.checkbox-label input:checked + .custom-checkbox::after { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.kms-select {
  background: rgba(0,0,0,0.2) !important; border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 10px; color: #fff !important; padding: 7px 12px; font-size: 13px; cursor: pointer;
  backdrop-filter: blur(10px); outline: none; transition: 0.2s;
}
.kms-select:focus { border-color: #00d2ff !important; box-shadow: 0 0 8px rgba(0,210,255,0.3); }
#stickyDurationSelect select {
  background: #111; color: #fff; border: 1px solid #333; border-radius: 6px; padding: 4px;
}
.cost-info { margin-left: 10px; font-size: 12px; color: #ffca28; }

.form-actions { display: flex; gap: 10px; margin-top: 12px; justify-content: flex-end; }
.btn-submit { background: #00ea1c; color: #000; font-weight: 700; border: none; padding: 6px 16px; border-radius: 8px; cursor: pointer; }

.btn-cancel {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #aaa;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}
.btn-cancel:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-color: rgba(255,255,255,0.2);
}

/* ========================
   Feed Card Structure
   ======================== */

.news-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.card-header {
  padding: 12px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.user-info { display: flex; align-items: center; gap: 10px; }
.avatar-ring {
  width: 38px; height: 38px; border-radius: 50%; padding: 2px;
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}
.avatar-ring.no-gradient { background: #444 !important; }
.avatar-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid #141423; }

.user-meta { display: flex; flex-direction: column; }
.name-row { display: flex; align-items: center; gap: 5px; }
.username { font-weight: 700; font-size: 14px; color: #fff; }
.date-label { font-size: 11px; color: rgba(255,255,255,0.5); }

.pin-badge {
  background: linear-gradient(135deg, #ffca28, #f57c00);
  color: #000; font-weight: 800; font-size: 10px; padding: 3px 8px; border-radius: 8px;
  box-shadow: 0 0 8px rgba(255, 202, 40, 0.4);
}

.card-content { padding: 8px 15px 12px 15px; line-height: 1.5; color: #e1e1e1; font-size: 14px; white-space: pre-wrap; word-wrap: break-word; }

/* Media Slider */
.card-media {
  position: relative;
  width: 100%;
}
.media-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  width: 100%;
  scrollbar-width: none;
}
.media-item {
  flex: 0 0 100%;
  scroll-snap-align: start;
  position: relative;
  display: flex; justify-content: center; background: #000;
}
.media-item img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
}

/* Relocated slider nav styles */
.slider-nav { display: none !important; } /* Hide old absoluta overlay */

/* Actions Section */
.card-actions {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 12px 15px 8px 15px !important;
  border-bottom: 1px solid rgba(255,255,255,0.04) !important;
}

.actions-left {
  display: flex !important;
  gap: 18px !important;
  flex: 1 !important; /* Pushes children right */
  flex-wrap: wrap !important; /* Allows items to match next row */
}

.action-item {
  display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 18px; transition: transform 0.1s;
}
.action-item span { font-size: 14px; color: #bbb; font-weight: 500; }
.action-item:active { transform: scale(0.9); }
.action-item.active { color: #ff2a6d !important; text-shadow: 0 0 10px rgba(255, 42, 109, 0.4); }
.action-item.active span { color: #fff; }

.actions-right {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-left: auto !important; /* Forces right align on Desktop */
}

.slide-counter {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.05);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: monospace;
}

.slider-btn-small {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.1);
  width: 26px;
  height: 26px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  transition: all 0.2s;
}

.slider-btn-small:hover {
  background: #00d2ff;
  color: #111;
  border-color: #00d2ff;
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.4);
}

.btn-delete {
  background: rgba(255, 59, 48, 0.12);
  border: 1px solid rgba(255, 59, 48, 0.2);
  color: #ff453a;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}

.btn-delete:hover {
  background: #ff453a;
  color: #fff;
  border-color: #ff453a;
  box-shadow: 0 0 10px rgba(255, 69, 58, 0.4);
}

.info-bar {
  padding: 8px 15px; display: flex; gap: 12px; font-size: 12px; color: rgba(255,255,255,0.4);
}

/* Comments Detail Panel */
.news-comments-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 11000;
  align-items: center;
  justify-content: center;
}

.news-comments-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

#newsCommentsModal .news-comments-content {
  width: 90%;
  max-width: 450px;
  height: 80vh;
  display: flex;
  flex-direction: column;
}
.comments-header { padding: 15px; border-bottom: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; }
.comments-list { flex: 1; overflow-y: auto; padding: 15px; }
.comment-item { margin-bottom: 12px; position: relative; }

.comment-input-area {
  padding: 12px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; gap: 8px; background: rgba(0,0,0,0.2);
}
.comment-input-area input {
  flex: 1; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; padding: 10px; color: #fff; font-size: 13px;
}
.comment-input-area button {
  background: #00d2ff; color: #000; border: none; font-weight: bold; border-radius: 12px; padding: 0 15px; cursor: pointer;
}

/* Responsive adjustments */
/* ========================
   Custom Toast Notifications
   ======================== */

.custom-toast {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(-30px);
  background: rgba(15, 15, 30, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 14px 28px;
  color: #fff;
  z-index: 999999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 25px rgba(0, 210, 255, 0.15);
}

.custom-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.custom-toast .toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 14px;
}

.custom-toast.success {
  border-color: rgba(0, 234, 28, 0.4);
  background: linear-gradient(135deg, rgba(0, 20, 5, 0.9), rgba(15, 15, 30, 0.85));
}

.custom-toast.error {
  border-color: rgba(255, 59, 48, 0.4);
  background: linear-gradient(135deg, rgba(30, 5, 5, 0.9), rgba(15, 15, 30, 0.85));
}

.toast-icon {
  font-size: 20px;
}

@media screen and (max-width: 900px) {
  .news-fullscreen-content {
      flex-direction: column !important;
      width: 100% !important;
      height: 100vh !important;
      height: 100dvh !important; /* iOS address bar fix */
      border-radius: 0 !important;
  }
  .column-left {
      flex: none !important;
      height: 40% !important; /* Reduce left side slightly for comments */
      border-right: none !important;
      border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  .column-right {
      flex: 1 !important;
      height: 60% !important; /* Allocate 60% for reads */
      min-height: 0 !important; /* Force scroll inner elements */
  }
}

.liker-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 2px solid #050508;
  margin-left: -18px;
  cursor: pointer;
  transition: transform 0.2s;
}
.liker-avatar:first-child {
  margin-left: 0;
}
.liker-avatar:hover {
  transform: translateY(-5px);
  z-index: 50;
}

.slider-btn-small {
  background: rgba(255, 255, 255, 0.08); 
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #fff; 
  width: 25px; 
  height: 25px; 
  border-radius: 50% !important; 
  font-size: 11px; 
  cursor: pointer; 
  display: flex !important; 
  align-items: center; 
  justify-content: center; 
  transition: all 0.2s;
  padding: 0;
}
.slider-btn-small:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ========================
   Custom Confirm Dialog
   ======================== */

.custom-confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.custom-confirm-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.custom-confirm-box {
  width: 90%;
  max-width: 380px;
  background: rgba(20, 20, 35, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 24px;
  padding: 30px;
  text-align: center;
  transform: scale(0.85);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-confirm-overlay.visible .custom-confirm-box {
  transform: scale(1);
}

.confirm-icon {
  font-size: 44px;
  margin-bottom: 15px;
  filter: drop-shadow(0 0 10px rgba(255, 77, 77, 0.3));
}

.confirm-message {
  font-size: 16px;
  color: #fff;
  font-weight: 700;
  margin-bottom: 25px;
  line-height: 1.5;
}

.confirm-actions {
  display: flex;
  gap: 15px;
}

.confirm-actions button {
  flex: 1;
  padding: 12px;
  border-radius: 14px;
  border: none;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-confirm-yes {
  background: linear-gradient(135deg, #ff4d4d, #d32f2f);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 77, 77, 0.3);
}

.btn-confirm-yes:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 77, 77, 0.5);
}

.btn-confirm-no {
  background: rgba(255, 255, 255, 0.08);
  color: #eee;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.btn-confirm-no:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}



/* Liker Avatars Standard Setup (Desktop) */
.likers-avatars-small {
    display: flex !important;
    align-items: center !important;
    gap: 3px !important;
    margin-left: 0 !important;
    width: 100% !important; /* Force to take individual row line */
    margin-top: 10px !important;
    padding-top: 8px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
}
.liker-avatar-mini {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    border: 1.5px solid #141423 !important;
    cursor: pointer !important;
    transition: transform 0.2s !important;
    position: relative !important;
}
.liker-avatar-mini:hover {
    transform: translateY(-5px) !important;
    z-index: 50 !important;
    box-shadow: 0 0 8px rgba(0, 210, 255, 0.6) !important;
}

/* Mobile adjustments for Liker Avatars */
@media screen and (max-width: 480px) {
  .card-actions {
    flex-wrap: wrap !important;
    gap: 10px !important;
  }
  .actions-left {
    flex-wrap: wrap !important;
    width: 100% !important;
    gap: 12px !important;
    justify-content: flex-start !important;
  }
  .actions-right {
    margin-left: 0 !important; /* Cancel push on Mobile */
  }
  .likers-avatars-small {
    width: 100% !important;
    margin-left: 0 !important;
    margin-top: 5px !important;
    padding: 6px 0 0 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    gap: 3px !important;
  }
  .liker-avatar-mini {
    width: 35px !important;
    height: 35px !important;
    margin-left: 0 !important;
  }
  .liker-avatar-mini:first-child {
    margin-left: 0 !important;
  }
}
