/* EXXXCALATION Admin Panel Custom Styles */

/* ===== SIDEBAR NAVIGATION SYSTEM ===== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 280px;
  background-color: #111827;
  border-right: 1px solid #374151;
  transform: translateX(0);
  transition: transform 0.3s ease-in-out;
  z-index: 40;
  overflow-y: auto;
}

.sidebar.collapsed {
  transform: translateX(-280px);
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid #374151;
  background-color: #1f2937;
}

.sidebar-logo {
  height: 40px;
  width: auto;
  margin-bottom: 0.5rem;
}

.sidebar-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #f9fafb;
  margin: 0;
}

.sidebar-nav {
  padding: 1rem 0;
}

.nav-item {
  display: flex !important;
  align-items: center !important;
  padding: 0.875rem 1.5rem !important;
  color: #9ca3af !important;
  text-decoration: none !important;
  transition: all 0.2s ease-in-out !important;
  cursor: pointer !important;
  border: none !important;
  background: none !important;
  width: 100% !important;
  text-align: left !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
}

.nav-item:hover {
  background-color: #374151 !important;
  color: #f9fafb !important;
}

.nav-item.active {
  background-color: #ec4899 !important;
  color: #ffffff !important;
  border-right: 4px solid #f472b6 !important;
}

.nav-item-icon {
  margin-right: 0.75rem;
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.sidebar-toggle {
  position: fixed !important;
  top: 1rem !important;
  z-index: 50 !important;
  background-color: #374151 !important;
  border: 1px solid #4b5563 !important;
  color: #f9fafb !important;
  padding: 0.5rem !important;
  border-radius: 0.375rem !important;
  cursor: pointer !important;
  transition: all 0.3s ease-in-out !important;
  display: flex !important;
  width: 40px !important;
  height: 40px !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Smart positioning to avoid overlaps */
@media (min-width: 1024px) {
  /* Desktop: Position right of sidebar when open, below header */
  .sidebar-toggle {
    left: 300px !important;
    top: 5rem !important; /* Below the content header */
  }
  
  /* When sidebar is collapsed, move to top-left */
  .sidebar.collapsed ~ .sidebar-toggle {
    left: 1rem !important;
    top: 1rem !important;
  }
}

/* Mobile and Tablet: Always in top-left */
@media (max-width: 1023px) {
  .sidebar-toggle {
    left: 1rem !important;
    top: 1rem !important;
  }
}

.sidebar-toggle:hover {
  background-color: #4b5563 !important;
  transform: scale(1.05) !important;
}

.main-content {
  margin-left: 280px;
  transition: margin-left 0.3s ease-in-out;
  min-height: 100vh;
}

.main-content.sidebar-collapsed {
  margin-left: 0;
}

.content-header {
  background-color: #1f2937;
  border-bottom: 1px solid #374151;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #f9fafb;
  margin: 0;
}

/* Responsive Content Spacing */
.content-body {
  padding: 1rem !important;
  max-width: 100% !important;
  margin: 0 auto !important;
}

@media (min-width: 768px) {
  .content-body {
    padding: 1.5rem !important;
  }
}

@media (min-width: 1024px) {
  .content-body {
    padding: 2rem 3rem !important;
    max-width: 1400px !important;
  }
}

@media (min-width: 1440px) {
  .content-body {
    padding: 2rem 4rem !important;
  }
}

/* Sidebar Base Styles */
.sidebar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  height: 100vh !important;
  width: 280px !important;
  background-color: #111827 !important;
  border-right: 1px solid #374151 !important;
  transform: translateX(0) !important;
  transition: transform 0.3s ease-in-out !important;
  z-index: 40 !important;
  overflow-y: auto !important;
}

/* Sidebar Collapsed State */
.sidebar.collapsed {
  transform: translateX(-280px) !important;
}

/* Mobile First Responsive Design */

/* Mobile devices (default - up to 767px) */
.sidebar {
  transform: translateX(-280px) !important;
}

.main-content {
  margin-left: 0 !important;
}

.sidebar.open {
  transform: translateX(0) !important;
}

/* Tablet devices (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .sidebar {
    transform: translateX(-280px) !important;
  }
  
  .sidebar.open {
    transform: translateX(0) !important;
  }
  
  .main-content {
    margin-left: 0 !important;
  }
}

/* Desktop devices (1024px and up) */
@media (min-width: 1024px) {
  .sidebar {
    transform: translateX(0) !important;
  }
  
  .sidebar.collapsed {
    transform: translateX(-280px) !important;
  }
  
  .main-content {
    margin-left: 280px !important;
  }
  
  .main-content.sidebar-collapsed {
    margin-left: 0 !important;
  }
}

/* Overlay for mobile */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 30;
  display: none;
}

.sidebar-overlay.active {
  display: block;
}

/* ===== ENHANCED SCROLLABLE SESSIONS ===== */
.scrollable-sessions-container {
  max-height: 500px !important;
  min-height: 400px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  border-radius: 0.5rem;
  background-color: #1f2937;
  border: 1px solid #374151;
  scrollbar-width: thin;
  scrollbar-color: #4b5563 #1f2937;
}

/* Ensure tabs are visible and functional with stronger selectors */
button.tab-button {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  transition: all 0.2s ease-in-out !important;
  cursor: pointer !important;
  user-select: none !important;
  position: relative !important;
  z-index: 10 !important;
}

button.tab-button:hover {
  color: #f9fafb !important;
  border-color: #d1d5db !important;
  background-color: rgba(75, 85, 99, 0.3) !important;
}

button.tab-button.active {
  color: #f472b6 !important;
  border-color: #ec4899 !important;
  background-color: rgba(236, 72, 153, 0.1) !important;
}

/* Debug mode - add visible borders temporarily */
.debug-mode .tab-button {
  border: 2px solid #10b981 !important;
  margin: 2px !important;
}

/* Enhanced Tab Content Spacing */
.tab-content {
  min-height: 400px !important;
  width: 100% !important;
  display: block !important;
  padding: 1rem 2rem 2rem 2rem !important;
  margin: 0 !important;
  background-color: transparent !important;
}

.tab-content.hidden {
  display: none !important;
  visibility: hidden !important;
}

/* Responsive tab content padding */
@media (min-width: 768px) {
  .tab-content {
    padding: 1.25rem 2.5rem 2.5rem 2.5rem !important;
  }
}

@media (min-width: 1024px) {
  .tab-content {
    padding: 1.5rem 2rem 3rem 2rem !important;
  }
}

@media (min-width: 1440px) {
  .tab-content {
    padding: 1.75rem 2.5rem 3.5rem 2.5rem !important;
  }
}

/* Section headers within tabs */
.tab-content h2 {
  margin-bottom: 2rem !important;
  margin-top: 0 !important;
}

.tab-content h3 {
  margin-bottom: 1.5rem !important;
  margin-top: 1.5rem !important;
}

/* Card spacing within tab content */
.tab-content .bg-gray-800 {
  margin-bottom: 1.5rem !important;
}

@media (min-width: 1024px) {
  .tab-content .bg-gray-800 {
    margin-bottom: 2rem !important;
  }
}

/* Ensure navigation container is visible */
.bg-gray-800.border-b.border-gray-700 {
  display: block !important;
  visibility: visible !important;
  min-height: 60px !important;
}

/* Navigation container */
nav.flex.space-x-8 {
  display: flex !important;
  visibility: visible !important;
  align-items: center !important;
  justify-content: flex-start !important;
  min-height: 60px !important;
}

/* Enhanced form styles */
.form-input {
  background-color: #374151;
  border: 1px solid #4b5563;
  border-radius: 0.5rem;
  padding: 0.75rem;
  color: #ffffff;
  transition: border-color 0.2s ease-in-out;
}

.form-input:focus {
  outline: none;
  border-color: #ec4899;
  box-shadow: 0 0 0 1px #ec4899;
}

/* Button styles */
.btn-primary {
  background-color: #ec4899;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

.btn-primary:hover {
  background-color: #db2777;
}

.btn-secondary {
  background-color: #4b5563;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

.btn-secondary:hover {
  background-color: #374151;
}

/* Modal styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal-content {
  background-color: #1f2937;
  border-radius: 0.5rem;
  padding: 1.5rem;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
}

/* Toast notifications */
.toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  color: white;
  z-index: 60;
  min-width: 200px;
  animation: slideIn 0.3s ease-in-out;
}

.toast.success {
  background-color: #059669;
}

.toast.error {
  background-color: #dc2626;
}

.toast.warning {
  background-color: #d97706;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Enhanced table styles */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 0.75rem;
  color: #9ca3af;
  font-weight: 600;
  border-bottom: 1px solid #374151;
}

.data-table td {
  padding: 0.75rem;
  border-bottom: 1px solid #374151;
}

.data-table tbody tr:hover {
  background-color: #374151;
  transition: background-color 0.2s ease-in-out;
}

/* Scrollable sessions container */
.scrollable-sessions-container {
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 0.5rem;
  background-color: #1f2937;
  scrollbar-width: thin;
  scrollbar-color: #4b5563 #1f2937;
}

.scrollable-sessions-container::-webkit-scrollbar {
  width: 8px;
}

.scrollable-sessions-container::-webkit-scrollbar-track {
  background: #1f2937;
  border-radius: 4px;
}

.scrollable-sessions-container::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-radius: 4px;
  border: 1px solid #374151;
}

.scrollable-sessions-container::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

/* Sessions table within scrollable container */
.scrollable-sessions-container table {
  width: 100%;
  margin-bottom: 0;
}

.scrollable-sessions-container .table-header {
  position: sticky;
  top: 0;
  background-color: #1f2937;
  z-index: 10;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Status indicators */
.status-active {
  background-color: #059669;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
}

.status-inactive {
  background-color: #6b7280;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
}

.status-error {
  background-color: #dc2626;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
}

/* Progress bars */
.progress-bar {
  width: 100%;
  height: 0.5rem;
  background-color: #4b5563;
  border-radius: 0.25rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: #ec4899;
  transition: width 0.3s ease-in-out;
}

/* Responsive Card Styles */
.card {
  background-color: #1f2937;
  border-radius: 0.5rem;
  padding: 1rem;
  border: 1px solid #374151;
  margin-bottom: 1rem;
  transition: all 0.3s ease-in-out;
}

@media (min-width: 768px) {
  .card {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .card {
    padding: 1.5rem;
    margin-bottom: 2rem;
  }
}

.card:hover {
  border-color: #4b5563;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1f2937;
}

::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

/* Loading states */
.loading-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid #4b5563;
  border-radius: 50%;
  border-top-color: #ec4899;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Enhanced Responsive Design */

/* Mobile spacing adjustments */
@media (max-width: 767px) {
  .modal-content {
    margin: 1rem;
    max-width: calc(100vw - 2rem);
    padding: 1rem;
  }
  
  .content-header {
    padding: 1rem !important;
    flex-direction: column !important;
    gap: 1rem !important;
    align-items: flex-start !important;
  }
  
  .page-title {
    font-size: 1.25rem !important;
  }
  
  /* Grid adjustments for mobile */
  .grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  
  /* Button spacing */
  .btn-primary, .btn-secondary {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
}

/* Tablet spacing adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
  .modal-content {
    margin: 2rem;
    max-width: calc(100vw - 4rem);
    padding: 1.5rem;
  }
  
  .content-header {
    padding: 1.5rem !important;
  }
  
  /* Grid adjustments for tablet */
  .grid.grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-4 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
  }
}

/* Desktop spacing adjustments */
@media (min-width: 1024px) {
  .modal-content {
    margin: 3rem;
    padding: 2rem;
  }
  
  .content-header {
    padding: 2rem !important;
  }
  
  /* Generous grid spacing for desktop */
  .grid {
    gap: 2rem !important;
  }
}