/* Header Popup Styles - Activity Center Style */

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-left: auto;
}

@media (max-width: 768px) {
  .header-actions {
    gap: 10px;
  }
}

.header-icon-wrapper {
  position: relative;
}

.header-icon-btn {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  padding: 0;
}

.header-icon-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.header-icon-btn i {
  font-size: 24px;
  color: #5e5d72;
  transition: color 0.3s ease;
}

.favorites-btn i {
  color: #ef4444;
}

.notifications-btn i {
  color: #f59e0b;
}

.header-icon-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #ef4444;
  color: white;
  border-radius: 50%;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  padding: 0 5px;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.notificationCount {
  background: #ef4444;
}

/* Activity Popup */
.activity-popup {
  position: absolute;
  top: calc(100% + 15px);
  right: 0;
  width: 380px;
  max-width: 90vw;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  max-height: 500px;
  display: flex;
  flex-direction: column;
}

.activity-popup.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Popup Arrow */
.activity-popup::before {
  content: '';
  position: absolute;
  top: -8px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid white;
}

/* Popup Header */
.activity-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.activity-popup-header h6 {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.activity-popup-settings {
  font-size: 14px;
  color: #477CDB;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.activity-popup-settings:hover {
  color: #3b5fc7;
  text-decoration: underline;
}

/* Popup Content */
.activity-popup-content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  padding: 16px 20px;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.2s ease;
  cursor: pointer;
}

.activity-item:hover {
  background: #f9fafb;
}

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

.activity-item.unread {
  background: #eff6ff;
}

.activity-item.unread:hover {
  background: #dbeafe;
}

/* Activity Avatar */
.activity-avatar {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  margin-right: 12px;
  margin-left: 0;
  flex-shrink: 0;
}

.activity-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Activity Info */
.activity-info {
  flex: 1;
  min-width: 0;
}

.activity-info a {
  text-decoration: none;
  color: #1f2937;
  display: block;
}

.activity-info strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
  line-height: 1.4;
}

.activity-info p {
  font-size: 14px;
  color: #6b7280;
  margin: 4px 0;
  line-height: 1.5;
}

.activity-info small {
  font-size: 12px;
  color: #9ca3af;
  display: block;
  margin-top: 4px;
}

/* Activity Footer */
.activity-footer {
  padding: 12px 20px;
  border-top: 1px solid #e5e7eb;
  text-align: center;
}

.activity-see-all {
  font-size: 14px;
  color: #477CDB;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.activity-see-all:hover {
  color: #3b5fc7;
  text-decoration: underline;
}

/* Empty State */
.activity-empty,
.activity-loading,
.activity-error {
  padding: 40px 20px;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}

/* RTL Support */
[dir="rtl"] .activity-popup {
  right: auto;
  left: 0;
}

[dir="rtl"] .activity-popup::before {
  right: auto;
  left: 20px;
}

[dir="rtl"] .activity-avatar {
  margin-left: 12px;
  margin-right: 0;
}

/* Responsive - Hide header icons on mobile and reduce header height */
@media (max-width: 991px) {
  .header-icon-wrapper {
    display: none !important;
  }

  .activity-popup {
    width: 320px;
    max-width: calc(100vw - 40px);
  }

  /* Reduce header padding on mobile */
  .header-part {
    padding: 10px 12px !important;
    min-height: 60px;
  }

  .header-part.sticky {
    padding: 6px 12px !important;
  }

  /* Reduce logo size on mobile */
  .header-logo img,
  .responsive-logo img {
    height: 35px !important;
    max-height: 35px !important;
  }

  /* Reduce header widget icons size */
  .header-widget i {
    width: 32px !important;
    height: 32px !important;
    font-size: 20px !important;
    line-height: 30px !important;
  }

  /* Reduce header responsive spacing */
  .header-responsive {
    gap: 8px;
  }
}

@media (max-width: 768px) {
  .activity-popup {
    width: 320px;
    max-width: calc(100vw - 40px);
  }

  .header-icon-btn {
    width: 40px;
    height: 40px;
  }

  .header-icon-btn i {
    font-size: 20px;
  }

  /* Further reduce header height on small mobile */
  .header-part {
    padding: 8px 10px !important;
    min-height: 55px;
  }

  .header-part.sticky {
    padding: 5px 10px !important;
  }

  .header-logo img,
  .responsive-logo img {
    height: 30px !important;
    max-height: 30px !important;
  }

  .header-widget i {
    width: 30px !important;
    height: 30px !important;
    font-size: 18px !important;
    line-height: 28px !important;
  }
}

/* Sidebar Icon Sizes */
.sidebar-modern .nav-icon-wrapper i.material-icons {
  font-size: 24px !important;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-modern .sidebar-group-header i.material-icons {
  font-size: 22px !important;
}

.sidebar-modern .btn-browse-all i.material-icons {
  font-size: 24px !important;
}

.sidebar-modern .sidebar-user-link i.material-icons {
  font-size: 20px !important;
}

.sidebar-modern .nav-arrow-modern.material-icons {
  font-size: 20px !important;
}

.sidebar-modern .drop-link-modern i.material-icons {
  font-size: 20px !important;
}

.sidebar-modern .select-arrow-modern.material-icons {
  font-size: 20px !important;
}

/* Sidebar Logo */
.sidebar-logo img {
  max-height: 50px;
  width: auto;
  object-fit: contain;
}

/* ============================================
   Sidebar RTL Support
   ============================================ */

/* Sidebar Position for RTL */
[dir="rtl"] .sidebar-part,
html[dir="rtl"] .sidebar-part,
html:lang(ar) .sidebar-part {
  left: auto !important;
  right: -350px !important;
  width: 320px !important;
}

[dir="rtl"] .sidebar-part.open,
html[dir="rtl"] .sidebar-part.open,
html:lang(ar) .sidebar-part.open {
  left: auto !important;
  right: 0 !important;
}

/* Responsive Sidebar for Arabic */
@media (max-width: 991px) {
  [dir="rtl"] .sidebar-part,
  html[dir="rtl"] .sidebar-part,
  html:lang(ar) .sidebar-part {
    width: 320px !important;
    right: -350px !important;
  }
}

@media (max-width: 768px) {
  [dir="rtl"] .sidebar-part,
  html[dir="rtl"] .sidebar-part,
  html:lang(ar) .sidebar-part {
    width: 300px !important;
    right: -330px !important;
  }
}

@media (max-width: 575px) {
  [dir="rtl"] .sidebar-part,
  html[dir="rtl"] .sidebar-part,
  html:lang(ar) .sidebar-part {
    width: 280px !important;
    right: -310px !important;
  }
}

/* Sidebar Header RTL */
[dir="rtl"] .sidebar-header-modern,
html[dir="rtl"] .sidebar-header-modern,
html:lang(ar) .sidebar-header-modern {
  flex-direction: row-reverse !important;
}

[dir="rtl"] .sidebar-close-modern,
html[dir="rtl"] .sidebar-close-modern,
html:lang(ar) .sidebar-close-modern {
  left: 20px !important;
  right: auto !important;
}

/* Sidebar User Section RTL */
/* [dir="rtl"] .sidebar-user-section,
html[dir="rtl"] .sidebar-user-section,
html:lang(ar) .sidebar-user-section {
  flex-direction: row-reverse !important;
} */

[dir="rtl"] .sidebar-user-info,
html[dir="rtl"] .sidebar-user-info,
html:lang(ar) .sidebar-user-info {
  text-align: right !important;
}

[dir="rtl"] .sidebar-user-link,
html[dir="rtl"] .sidebar-user-link,
html:lang(ar) .sidebar-user-link {
  transform: translateX(0px) scaleX(-1);
  order: 2;
}

/* Sidebar Navigation RTL */
/* [dir="rtl"] .nav-link-modern,
html[dir="rtl"] .nav-link-modern,
html:lang(ar) .nav-link-modern {
  flex-direction: row-reverse !important;
} */

[dir="rtl"] .nav-icon-wrapper,
html[dir="rtl"] .nav-icon-wrapper,
html:lang(ar) .nav-icon-wrapper {
  margin-left: 12px !important;
  margin-right: 0 !important;
  order: 1;
}

[dir="rtl"] .nav-text-modern,
html[dir="rtl"] .nav-text-modern,
html:lang(ar) .nav-text-modern {
  order: 2;
  text-align: right;
}

[dir="rtl"] .nav-arrow-modern,
html[dir="rtl"] .nav-arrow-modern,
html:lang(ar) .nav-arrow-modern {
  transform: scaleX(-1);
  margin-left: auto !important;
  margin-right: 0 !important;
  order: 2;
}

[dir="rtl"] .nav-badge-modern,
html[dir="rtl"] .nav-badge-modern,
html:lang(ar) .nav-badge-modern {
  order: 2;
  margin-left: 8px !important;
  margin-right: auto !important;
}

/* Sidebar Dropdown RTL */
[dir="rtl"] .drop-list-modern,
html[dir="rtl"] .drop-list-modern,
html:lang(ar) .drop-list-modern {
  padding-right: 52px !important;
  padding-left: 0 !important;
}

/* [dir="rtl"] .drop-link-modern,
html[dir="rtl"] .drop-link-modern,
html:lang(ar) .drop-link-modern {
  flex-direction: row-reverse !important;
} */

[dir="rtl"] .drop-link-modern i,
html[dir="rtl"] .drop-link-modern i,
html:lang(ar) .drop-link-modern i {
  margin-left: 12px !important;
  margin-right: 0 !important;
  order: 1;
}

[dir="rtl"] .drop-link-modern span,
html[dir="rtl"] .drop-link-modern span,
html:lang(ar) .drop-link-modern span {
  order: 2;
  text-align: right;
}

/* Language Selector RTL */
/* [dir="rtl"] .select-data-modern,
html[dir="rtl"] .select-data-modern,
html:lang(ar) .select-data-modern {
  flex-direction: row-reverse !important;
} */

[dir="rtl"] .select-image-modern,
html[dir="rtl"] .select-image-modern,
html:lang(ar) .select-image-modern {
  margin-left: 15px !important;
  margin-right: 0 !important;
  order: 1;
}

[dir="rtl"] .select-text-modern,
html[dir="rtl"] .select-text-modern,
html:lang(ar) .select-text-modern {
  order: 2;
  text-align: right;
}

[dir="rtl"] .select-arrow-modern,
html[dir="rtl"] .select-arrow-modern,
html:lang(ar) .select-arrow-modern {
  transform: scaleX(-1);
  margin-left: auto !important;
  margin-right: 0 !important;
  order: 2;
}

/* [dir="rtl"] .option-list-modern,
html[dir="rtl"] .option-list-modern,
html:lang(ar) .option-list-modern {
  right: 0 !important;
  left: auto !important;
} */

/* [dir="rtl"] .option-link-modern,
html[dir="rtl"] .option-link-modern,
html:lang(ar) .option-link-modern {
  flex-direction: row-reverse !important;
} */

[dir="rtl"] .option-image-modern,
html[dir="rtl"] .option-image-modern,
html:lang(ar) .option-image-modern {
  margin-left: 12px !important;
  margin-right: 0 !important;
  order: 1;
}

[dir="rtl"] .option-text-modern,
html[dir="rtl"] .option-text-modern,
html:lang(ar) .option-text-modern {
  order: 2;
  text-align: right;
}

/* Sidebar Group Header RTL */
/* [dir="rtl"] .sidebar-group-header,
html[dir="rtl"] .sidebar-group-header,
html:lang(ar) .sidebar-group-header {
  flex-direction: row-reverse !important;
} */

[dir="rtl"] .sidebar-group-header i,
html[dir="rtl"] .sidebar-group-header i,
html:lang(ar) .sidebar-group-header i {
  margin-left: 12px !important;
  margin-right: 0 !important;
  order: 1;
}

[dir="rtl"] .sidebar-title-modern,
html[dir="rtl"] .sidebar-title-modern,
html:lang(ar) .sidebar-title-modern {
  order: 2;
  text-align: right;
}

/* Sidebar Badge RTL */
[dir="rtl"] .nav-badge-modern,
html[dir="rtl"] .nav-badge-modern,
html:lang(ar) .nav-badge-modern {
  margin-left: 8px !important;
  margin-right: auto !important;
}

/* Sidebar Button RTL */
[dir="rtl"] .btn-browse-all,
html[dir="rtl"] .btn-browse-all,
html:lang(ar) .btn-browse-all {
  flex-direction: row-reverse !important;
}

[dir="rtl"] .btn-browse-all i,
html[dir="rtl"] .btn-browse-all i,
html:lang(ar) .btn-browse-all i {
  margin-left: 8px !important;
  margin-right: 0 !important;
  order: 1;
}

[dir="rtl"] .btn-browse-all span,
html[dir="rtl"] .btn-browse-all span,
html:lang(ar) .btn-browse-all span {
  order: 2;
  text-align: right;
}

/* Sidebar Scrollbar RTL */
[dir="rtl"] .sidebar-content-modern,
html[dir="rtl"] .sidebar-content-modern,
html:lang(ar) .sidebar-content-modern {
  direction: rtl;
}

[dir="rtl"] .sidebar-content-modern::-webkit-scrollbar,
html[dir="rtl"] .sidebar-content-modern::-webkit-scrollbar,
html:lang(ar) .sidebar-content-modern::-webkit-scrollbar {
  left: 0;
  right: auto;
}

