/* ========================================================
   MIRRYKAL COMMUNITY & SOCIAL FEED SYSTEM
   File: /community/community.css
   ======================================================== */

:root {
  --mk-card-bg: rgba(15, 23, 42, 0.72);
  --mk-card-border: rgba(255, 255, 255, 0.12);
  --mk-accent: #00d2ff;
  --mk-verified: #1d9bf0;
  --mk-text-main: #f8fafc;
  --mk-text-muted: #94a3b8;
  --mk-danger: #ef4444;
}

/* Header Notification Bell */
.mk-noti-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.mk-noti-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.mk-noti-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--mk-accent);
}

.mk-noti-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--mk-danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #0b1120;
}

.mk-noti-dropdown {
  position: absolute;
  top: 48px;
  right: 0;
  width: 330px;
  max-height: 440px;
  background: #0b1222;
  border: 1px solid var(--mk-card-border);
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(0,0,0,0.85);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 99999;
}

.mk-noti-header {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mk-noti-list {
  overflow-y: auto;
  max-height: 370px;
}

.mk-noti-item {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--mk-text-muted);
  transition: background 0.2s;
}

.mk-noti-item.unread {
  background: rgba(0, 210, 255, 0.06);
  color: var(--mk-text-main);
}

.mk-noti-item .noti-time {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 4px;
}

/* Feed Section Wrapper */
.community-feed-section {
  width: 100%;
  max-width: 650px;
  margin: 32px auto 80px;
  padding: 0 16px;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
}

/* Post Creator Box */
.mk-create-post-card {
  background: var(--mk-card-bg);
  border: 1px solid var(--mk-card-border);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 24px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.create-post-top {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.create-avatar {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  background: #1e293b;
  display: block;
}

.post-trigger-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--mk-text-muted);
  border-radius: 999px;
  padding: 11px 18px;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-trigger-input:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--mk-accent);
  color: #fff;
}

/* Feed Dynamic Follow Pill */
.mk-btn-follow-feed {
  background: rgba(0, 210, 255, 0.12);
  color: var(--mk-accent);
  border: 1px solid rgba(0, 210, 255, 0.35);
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mk-btn-follow-feed:hover {
  background: var(--mk-accent);
  color: #030a1c;
}

/* Expanded Post Box Modal */
.mk-post-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 100000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.mk-post-modal {
  background: #0b1329;
  border: 1px solid var(--mk-card-border);
  border-radius: 22px;
  width: 100%;
  max-width: 500px;
  padding: 20px;
  color: #fff;
  box-shadow: 0 25px 60px rgba(0,0,0,0.9);
}

.mk-post-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
}

.mk-post-textarea {
  width: 100%;
  min-height: 110px;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.95rem;
  resize: vertical;
  font-family: inherit;
  margin-bottom: 12px;
}

.mk-image-preview-box {
  width: 100%;
  max-height: 240px;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  display: none;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.mk-image-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mk-preview-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
}

.mk-post-modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mk-upload-photo-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--mk-accent);
  font-size: 0.85rem;
  font-weight: 600;
}

.mk-btn-primary {
  background: var(--mk-accent);
  color: #030a1c;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.mk-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Feed Cards */
.mk-post-card {
  background: var(--mk-card-bg);
  border: 1px solid var(--mk-card-border);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 20px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  position: relative;
}

.mk-post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.mk-post-author {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.mk-author-meta h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.mk-author-meta span {
  font-size: 0.75rem;
  color: var(--mk-text-muted);
}

/* Official Blue Star Verified Badge */
.mk-verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-left: 4px;
}

.mk-verified-badge svg {
  width: 17px;
  height: 17px;
  fill: var(--mk-verified);
}

/* 3-Dots Menu & Contextual Action Window */
.mk-post-menu-trigger {
  background: transparent;
  border: none;
  color: var(--mk-text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 50%;
  line-height: 1;
  transition: all 0.15s ease;
}

.mk-post-menu-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.mk-post-actions-dropdown {
  display: none;
  position: absolute;
  top: 40px;
  right: 0;
  background: #0f172a;
  border: 1px solid var(--mk-card-border);
  border-radius: 14px;
  width: 190px;
  padding: 6px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8);
  z-index: 1000;
  flex-direction: column;
  animation: mkFadeDrop 0.18s ease-out forwards;
}

.mk-dropdown-item {
  padding: 9px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mk-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.mk-dropdown-item.text-danger {
  color: #f87171;
}

.mk-dropdown-item.text-danger:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

@keyframes mkFadeDrop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.mk-post-caption {
  font-size: 0.92rem;
  line-height: 1.55;
  color: #f1f5f9;
  margin-bottom: 14px;
  white-space: pre-wrap;
}

.mk-post-media {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 14px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mk-post-media img {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  display: block;
}

/* Post Action Row */
.mk-post-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 14px 2px;
}

.mk-action-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.mk-action-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mk-action-btn.like-btn:hover {
  color: #f43f5e;
  background: rgba(244, 63, 94, 0.1);
}

.mk-action-btn.active-like {
  color: #f43f5e;
}

.mk-action-btn.active-like svg {
  fill: #f43f5e;
  stroke: #f43f5e;
  animation: mkHeartPop 0.3s cubic-bezier(0.17, 0.89, 0.32, 1.49);
}

.mk-action-btn.comment-btn:hover {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
}

.mk-action-btn.share-btn:hover {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

@keyframes mkHeartPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Comments Shelf */
.mk-comments-box {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 12px;
  padding-top: 12px;
  display: none;
}

.mk-comment-input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.mk-comment-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.82rem;
  outline: none;
}

.mk-comment-item {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.8rem;
}

.mk-comment-bubble {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 8px 12px;
  flex: 1;
}

.mk-comment-user {
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Setup Identity & Onboarding Modal */
.mk-onboarding-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 1000000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.mk-onboarding-modal {
  background: #0f1629;
  border: 1px solid var(--mk-accent);
  border-radius: 24px;
  max-width: 400px;
  width: 100%;
  padding: 26px;
  color: #fff;
  box-shadow: 0 0 35px rgba(0, 210, 255, 0.2);
}

.mk-setup-avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 12px;
  display: block;
  border: 2px solid var(--mk-accent);
}

/* Shimmer Skeleton Loading */
.mk-skeleton-card {
  background: var(--mk-card-bg);
  border: 1px solid var(--mk-card-border);
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 20px;
}
.mk-skeleton-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.mk-skeleton-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  animation: mkShimmer 1.5s infinite;
}
.mk-skeleton-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mk-skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  animation: mkShimmer 1.5s infinite;
}
.mk-skeleton-line.short { width: 35%; }
.mk-skeleton-line.mini { width: 20%; height: 9px; }
.mk-skeleton-line.full { width: 90%; margin-bottom: 8px; }
.mk-skeleton-line.medium { width: 60%; }
.mk-skeleton-media {
  width: 100%;
  height: 200px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  animation: mkShimmer 1.5s infinite;
  margin-top: 10px;
}

@keyframes mkShimmer {
  0% { opacity: 0.4; }
  50% { opacity: 0.8; }
  100% { opacity: 0.4; }
}
