/* ============================================
   ANNOUNCEMENTS / WHAT'S NEW - CSS
   Duyuru sistemi stilleri
============================================ */

/* ============================================
   WHAT'S NEW MODAL
============================================ */

.whats-new-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 10001;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  animation: wnFadeIn 0.2s ease;
}

.whats-new-modal-overlay.active {
  display: flex;
}

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

@keyframes wnSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.whats-new-modal {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
  animation: wnSlideUp 0.3s ease;
  overflow: hidden;
}

/* Header */
.whats-new-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.whats-new-header-left {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.whats-new-header-left h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.whats-new-header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.whats-new-mark-all {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  background: white;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}

.whats-new-mark-all:hover {
  background: #f8fafc;
  color: #334155;
  border-color: #cbd5e1;
}

.whats-new-close {
  width: 36px;
  height: 36px;
  border: none;
  background: #f8fafc;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: all 0.2s;
}

.whats-new-close:hover {
  background: #f1f5f9;
  color: #1e293b;
}

/* Tabs */
.whats-new-tabs {
  display: flex;
  gap: 2px;
  padding: 0.75rem 1.5rem 0;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
  overflow-x: auto;
}

.whats-new-tab {
  padding: 8px 16px;
  border: none;
  background: none;
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.whats-new-tab:hover {
  color: #64748b;
}

.whats-new-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.whats-new-tab-badge {
  background: var(--color-primary);
  color: white;
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
}

/* Content Area */
.whats-new-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem 1.5rem;
}

.whats-new-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 3rem;
  color: #94a3b8;
  font-size: 0.875rem;
}

.whats-new-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
}

.whats-new-empty p {
  margin-top: 0.75rem;
  color: #94a3b8;
  font-size: 0.9rem;
}

/* Announcement Item */
.whats-new-item {
  padding: 1.25rem;
  border-radius: 14px;
  border: 1px solid #f1f5f9;
  margin-bottom: 0.875rem;
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
}

.whats-new-item:hover {
  border-color: #e2e8f0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.whats-new-item.unread {
  border-left: 3px solid var(--color-primary);
  background: #fffbf5;
}

.whats-new-item.unread:hover {
  background: #fff7ed;
}

.whats-new-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.625rem;
}

.whats-new-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.whats-new-date {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 500;
}

.whats-new-item-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
}

.whats-new-item-content {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.6;
  word-break: break-word;
}

.whats-new-item-content p {
  margin-bottom: 0.5rem;
}

.whats-new-item-content p:last-child {
  margin-bottom: 0;
}

.whats-new-item-image {
  width: 100%;
  border-radius: 10px;
  margin-top: 0.75rem;
  max-height: 200px;
  object-fit: cover;
  border: 1px solid #f1f5f9;
}

.whats-new-item-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}

.whats-new-item-link:hover {
  color: #e85500;
}

.whats-new-pinned {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 0.625rem;
  font-size: 0.7rem;
  color: var(--color-primary);
  font-weight: 600;
}


/* ============================================
   DASHBOARD ANNOUNCEMENTS CARD
============================================ */

.dashboard-announcements-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dashboard-announcement-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.2s;
  border-radius: 0;
}

.dashboard-announcement-item:last-child {
  border-bottom: none;
}

.dashboard-announcement-item:hover {
  background: #fafbfc;
}

.dashboard-announcement-item.unread {
  background: #fffbf5;
  border-left: 3px solid var(--color-primary);
}

.dashboard-announcement-item.unread:hover {
  background: #fff7ed;
}

.dashboard-announcement-left {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  flex: 1;
  min-width: 0;
}

.dashboard-announcement-type {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dashboard-announcement-info {
  flex: 1;
  min-width: 0;
}

.dashboard-announcement-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.dashboard-announcement-desc {
  font-size: 0.8rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-announcement-date {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 500;
  white-space: nowrap;
  margin-left: 1rem;
  flex-shrink: 0;
}


/* ============================================
   RESPONSIVE
============================================ */

@media (max-width: 768px) {
  .whats-new-modal {
    max-width: 100%;
    max-height: 95vh;
    border-radius: 16px 16px 0 0;
    margin-top: auto;
  }

  .whats-new-header {
    padding: 1rem;
  }

  .whats-new-tabs {
    padding: 0.5rem 1rem 0;
  }

  .whats-new-content {
    padding: 0.75rem 1rem 1rem;
  }

  .whats-new-item {
    padding: 1rem;
  }

  .whats-new-mark-all span {
    display: none;
  }

  .dashboard-announcement-desc {
    display: none;
  }
}

@media (max-width: 480px) {
  .whats-new-tab {
    padding: 6px 10px;
    font-size: 0.75rem;
  }
}


/* ============================================
   DARK MODE
============================================ */

.dark-mode .whats-new-modal {
  background: #1e293b;
}

.dark-mode .whats-new-header {
  border-color: #334155;
}

.dark-mode .whats-new-header-left h3 {
  color: #f1f5f9;
}

.dark-mode .whats-new-mark-all {
  background: #334155;
  border-color: #475569;
  color: #94a3b8;
}

.dark-mode .whats-new-mark-all:hover {
  background: #475569;
  color: #e2e8f0;
}

.dark-mode .whats-new-close {
  background: #334155;
  color: #94a3b8;
}

.dark-mode .whats-new-close:hover {
  background: #475569;
  color: #f1f5f9;
}

.dark-mode .whats-new-tabs {
  border-color: #334155;
}

.dark-mode .whats-new-tab {
  color: #64748b;
}

.dark-mode .whats-new-tab:hover {
  color: #94a3b8;
}

.dark-mode .whats-new-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.dark-mode .whats-new-item {
  border-color: #334155;
  background: #1e293b;
}

.dark-mode .whats-new-item:hover {
  border-color: #475569;
  background: #243044;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.dark-mode .whats-new-item.unread {
  background: #2a2015;
  border-left-color: var(--color-primary);
}

.dark-mode .whats-new-item.unread:hover {
  background: #332818;
}

.dark-mode .whats-new-item-title {
  color: #f1f5f9;
}

.dark-mode .whats-new-item-content {
  color: #94a3b8;
}

.dark-mode .whats-new-date {
  color: #64748b;
}

.dark-mode .whats-new-item-image {
  border-color: #334155;
}

/* Dashboard Dark Mode */
.dark-mode .dashboard-announcement-item {
  border-color: #334155;
}

.dark-mode .dashboard-announcement-item:hover {
  background: #243044;
}

.dark-mode .dashboard-announcement-item.unread {
  background: #2a2015;
  border-left-color: var(--color-primary);
}

.dark-mode .dashboard-announcement-item.unread:hover {
  background: #332818;
}

.dark-mode .dashboard-announcement-title {
  color: #f1f5f9;
}

.dark-mode .dashboard-announcement-desc {
  color: #64748b;
}

.dark-mode .dashboard-announcement-date {
  color: #64748b;
}


/* ============================================
   SCROLLBAR STYLING
============================================ */

.whats-new-content::-webkit-scrollbar {
  width: 6px;
}

.whats-new-content::-webkit-scrollbar-track {
  background: transparent;
}

.whats-new-content::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 3px;
}

.whats-new-content::-webkit-scrollbar-thumb:hover {
  background: #cbd5e1;
}

.dark-mode .whats-new-content::-webkit-scrollbar-thumb {
  background: #475569;
}

.dark-mode .whats-new-content::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Mobil drawer zemin — düz renk, harici shorthand üstüne (yüklenme sırası: bu dosya sonra) */
@media (max-width: 1024px) {
  html.dark-mode body aside#sidebar.sidebar.mobile-open,
  html.dark-mode html body aside#sidebar.sidebar.mobile-open {
    background: #0f172a !important;
    background-color: #0f172a !important;
    background-image: none !important;
    opacity: 1 !important;
  }

  html:not(.dark-mode) body aside#sidebar.sidebar.mobile-open,
  html:not(.dark-mode) html body aside#sidebar.sidebar.mobile-open {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    opacity: 1 !important;
  }
}
