/* Totem Systems Theme CSS */

:root {
  --totem-primary: #4a4ca0; /* Purple from logo */
  --totem-secondary: #3eb3de; /* Blue from logo */
  --totem-dark: #1c1e3f;
  --totem-light: #f5f7f9;
  --totem-gray: #738091;
}

/* Gradient styles */
.totem-gradient {
  background: linear-gradient(135deg, var(--totem-primary), var(--totem-secondary));
  color: white;
}

.totem-gradient-text {
  background: linear-gradient(135deg, var(--totem-primary), var(--totem-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--totem-primary); /* Fallback */
}

/* Navbar & Header */
.navbar-totem {
  background: var(--totem-dark);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
  height: 40px;
}

.navbar-totem .nav-link {
  color: rgba(255, 255, 255, 0.8) !important;
  font-weight: 500;
  transition: color 0.3s;
}

.navbar-totem .nav-link:hover,
.navbar-totem .nav-link:focus {
  color: white !important;
}

.navbar-totem .btn-outline-light:hover {
  background: var(--totem-primary);
  border-color: var(--totem-primary);
}

/* Navbar toggle button styling */
.navbar-totem .navbar-toggler {
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 4px 8px;
}

.navbar-totem .navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
}

.navbar-totem .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Cards */
.card {
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.card-header {
  background: linear-gradient(135deg, var(--totem-primary), var(--totem-secondary));
  color: white;
  border-radius: 10px 10px 0 0 !important;
  border-bottom: none;
  font-weight: 600;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--totem-primary), var(--totem-secondary));
  border: none;
  box-shadow: 0 2px 6px rgba(74, 76, 160, 0.4);
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.3s;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--totem-primary), var(--totem-primary));
  box-shadow: 0 4px 10px rgba(74, 76, 160, 0.6);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--totem-secondary);
  border-color: var(--totem-secondary);
}

.btn-danger {
  background: #e74c3c;
  border-color: #e74c3c;
}

/* Table Styles */
.table {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.table thead th {
  background: var(--totem-dark);
  color: white;
  border-bottom: none;
  font-weight: 600;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(74, 76, 160, 0.05);
}

/* Badges */
.badge {
  font-weight: 500;
  border-radius: 4px;
  padding: 0.4em 0.6em;
}

.badge.bg-success {
  background: var(--totem-secondary) !important;
}

.badge.bg-danger {
  background: #e74c3c !important;
}

.badge.bg-secondary {
  background: var(--totem-gray) !important;
}

/* Forms */
.form-control {
  border-radius: 6px;
  border: 1px solid #dee2e6;
  padding: 0.5rem 0.75rem;
  transition: all 0.3s;
}

.form-control:focus {
  border-color: var(--totem-primary);
  box-shadow: 0 0 0 0.2rem rgba(74, 76, 160, 0.25);
}

.input-group-text {
  border-radius: 6px;
}

/* Custom auto-refresh toggle */
.form-switch .form-check-input:checked {
  background-color: var(--totem-secondary);
  border-color: var(--totem-secondary);
}

.form-switch .form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(62, 179, 222, 0.25);
}

/* Totem-specific custom components */
.refresh-controls {
  background: rgba(74, 76, 160, 0.05);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 1rem;
}

.room-input {
  border: 1px solid #dee2e6;
  transition: all 0.3s;
}

.room-input:focus {
  border-color: var(--totem-primary);
  box-shadow: 0 0 0 0.2rem rgba(74, 76, 160, 0.25);
}

.save-room-btn {
  color: var(--totem-secondary);
  border-color: var(--totem-secondary);
}

.save-room-btn:hover {
  background-color: var(--totem-secondary);
  color: white;
}

/* Main container */
.container-totem {
  background-color: var(--totem-light);
  min-height: calc(100vh - 56px);
  padding: 2rem 0;
}

/* Remove button styling */
.remove-shadow-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.remove-shadow-btn i {
  font-size: 0.75rem;
}

/* Mobile-specific table improvements */
@media (max-width: 992px) {
  .table {
    font-size: 0.8rem;
  }
  
  .table td {
    padding: 0.5rem 0.25rem;
    vertical-align: top;
  }
  
  .room-input {
    font-size: 0.85rem;
    min-width: 80px;
  }
  
  .btn-group-sm .btn {
    padding: 0.25rem 0.4rem;
    font-size: 0.75rem;
  }
  
  .shadow-name-toggle {
    font-size: 0.7rem;
  }
  
  /* Ensure buttons stack nicely */
  .btn-group {
    width: 100%;
  }
  
  .btn-group .btn {
    flex: 1;
  }
  
  /* Make remove button even smaller on mobile */
  .remove-shadow-btn {
    width: 28px;
    height: 28px;
  }
  
  .remove-shadow-btn i {
    font-size: 0.7rem;
  }
}

/* Footer */
.footer-totem {
  background: var(--totem-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 1rem 0;
  text-align: center;
  font-size: 0.9rem;
}