/* Casino Pages Styling */

/* Card bodies use flexbox to push buttons to bottom
   d-flex flex-column is applied via Bootstrap classes in templates
   Content areas use flex-grow-1 to expand and buttons use mt-auto to stick to bottom */


.casino-card .btn {
  transition: all 0.2s ease;
}

.casino-card .btn:hover {
  transform: scale(1.05);
}

/* Card titles consistent with landing page */
.card-title {
  font-weight: 600;
}

/* List view table styling */
.table {
  table-layout: auto;
  width: 100%;
}

.table th {
  background-color: rgba(108, 117, 125, 0.2);
  border-color: rgba(255, 255, 255, 0.1);
  font-weight: 600;
  white-space: nowrap;
}

.table td {
  border-color: rgba(255, 255, 255, 0.1);
  vertical-align: middle;
}

.table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.table .badge {
  font-size: 0.75em;
}

.table .btn-group .btn {
  padding: 0.25rem 0.5rem;
}

/* Badge styling */
.badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

.badge i {
  vertical-align: baseline;
  margin-right: 0.25rem;
}

/* Casino name prominence for table views */
.casino-name {
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.2;
  transition: color 0.2s ease;
}



/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .table th,
  .table td {
    padding: 0.375rem 0.2rem;
    font-size: 0.8rem;
  }

  .table .badge {
    font-size: 0.65em;
    padding: 0.25em 0.4em;
  }
  
  
  /* Compact the min/max columns for casinos table */
  .table th:nth-child(3),
  .table td:nth-child(3),
  .table th:nth-child(4),
  .table td:nth-child(4) {
    padding: 0.375rem 0.15rem;
  }
  
  /* Make daily reward type column more compact */
  .table th:nth-child(5),
  .table td:nth-child(5) {
    font-size: 0.7rem;
    padding: 0.375rem 0.1rem;
  }
}

@media (max-width: 576px) {
  /* On very small screens, make everything even more compact */
  .table th,
  .table td {
    padding: 0.25rem 0.1rem;
    font-size: 0.75rem;
  }
  
  .casino-name {
    font-size: 1rem;
  }
  
  .table .btn-sm {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }
}

/* Sidebar Styles */
/* Desktop behavior - sidebar pushes content */
@media (min-width: 992px) {
  body.sidebar-open {
    margin-left: 300px;
    transition: margin-left 0.3s ease;
  }

  body.sidebar-closed {
    margin-left: 0;
    transition: margin-left 0.3s ease;
  }

  /* Header should move with content when sidebar is open */
  body.sidebar-open header {
    left: 300px;
    right: 0;
    width: auto;
    transition: left 0.3s ease;
  }

  body.sidebar-closed header {
    left: 0;
    right: 0;
    width: auto;
    transition: left 0.3s ease;
  }
}

/* Mobile behavior - sidebar overlays content */
@media (max-width: 991.98px) {
  body.sidebar-open,
  body.sidebar-closed {
    margin-left: 0;
  }

  body.sidebar-open header,
  body.sidebar-closed header {
    left: 0;
    right: 0;
    width: auto;
  }
}

.sidebar {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100vh;
  background-color: #212529;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  transition: left 0.3s ease;
  z-index: 1050;
  display: flex;
  flex-direction: column;
}

.sidebar.active {
  left: 0;
}

/* Backdrop overlay for mobile */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Show overlay on mobile when sidebar is open */
@media (max-width: 991.98px) {
  body.sidebar-open .sidebar-overlay {
    opacity: 1;
    visibility: visible;
  }
}

/* Hide overlay on desktop */
@media (min-width: 992px) {
  .sidebar-overlay {
    display: none;
  }
}

.sidebar-content {
  flex: 1;
  padding: 1rem 0;
  padding-top: 1rem;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.sidebar-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
}

.sidebar-link.active {
  background-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-left-color: #0d6efd;
}

.sidebar-link i {
  width: 20px;
  text-align: center;
}

/* Header alignment fixes */
header .d-flex.align-items-center {
  align-items: center !important;
}

/* Burger menu button adjustments */
#sidebarToggle {
  padding: 0.375rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

#sidebarToggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.75);
}

/* Logo link alignment */
header .h2 {
  margin: 0 !important;
  line-height: 1 !important;
}

/* Ensure sidebar appears above Bootstrap components */
@media (max-width: 991.98px) {
  .sidebar {
    z-index: 1060;
  }

  .sidebar-overlay {
    z-index: 1055;
  }
}

/* Expandable sidebar sections */
.sidebar-section {
  position: relative;
}

.sidebar-toggle {
  position: relative;
  cursor: pointer;
}

.sidebar-arrow {
  transition: transform 0.2s ease;
  font-size: 0.75rem;
}

.sidebar-section.expanded .sidebar-arrow {
  transform: rotate(180deg);
}

.sidebar-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background-color: rgba(0, 0, 0, 0.2);
}

.sidebar-section.expanded .sidebar-submenu {
  max-height: 300px;
}

.sidebar-sublink {
  display: flex;
  align-items: center;
  padding: 0.5rem 1.5rem 0.5rem 3rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  border-left: 3px solid transparent;
}

.sidebar-sublink:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

.sidebar-sublink.active {
  background-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-left-color: #0d6efd;
}

.sidebar-sublink i {
  width: 16px;
  text-align: center;
  font-size: 0.8rem;
}

/* Disabled states for unauthenticated users */
.sidebar-link.disabled,
.sidebar-sublink.disabled {
  color: rgba(255, 255, 255, 0.4);
  cursor: not-allowed;
  position: relative;
}

.sidebar-link.disabled:hover,
.sidebar-sublink.disabled:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.5);
}

.sidebar-link.disabled .fa-lock,
.sidebar-sublink.disabled .fa-lock {
  color: rgba(255, 193, 7, 0.8);
  font-size: 0.7rem;
}

/* Locked submenu - always visible for unauthenticated users */
.sidebar-submenu.locked {
  max-height: 300px;
  opacity: 0.6;
}

/* Tooltips for disabled items */
.sidebar-link.disabled[title]:hover::after,
.sidebar-sublink.disabled[title]:hover::after {
  content: attr(title);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 10px;
  padding: 0.25rem 0.5rem;
  background-color: rgba(0, 0, 0, 0.9);
  color: white;
  font-size: 0.75rem;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 1070;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}