/* Canteen Seller Interface Stylesheet */

.seller-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Search and Filter bar */
.control-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  gap: 15px;
}

.search-wrapper {
  position: relative;
  flex-grow: 1;
  max-width: 500px;
}

.search-input {
  width: 100%;
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 1rem;
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--accent-violet);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}

.action-buttons {
  display: flex;
  gap: 10px;
}

/* Grid layout for team cards */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}

.team-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.team-info {
  text-align: center;
  margin-bottom: 15px;
  width: 100%;
}

.team-name {
  font-size: 1.3rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.team-score-badge {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--accent-cyan);
  line-height: 1;
  margin: 10px 0;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.team-score-badge.pulse {
  transform: scale(1.3);
  color: var(--accent-pink);
}

/* Quick Score buttons layout */
.score-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
}

.btn-score {
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 1.1rem;
  height: 48px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.1s ease;
  user-select: none;
}

.btn-score:active {
  transform: scale(0.92);
}

.btn-score.plus-1 {
  background: rgba(6, 182, 212, 0.2);
  border: 1px solid rgba(6, 182, 212, 0.45);
  color: var(--accent-cyan);
}
.btn-score.plus-1:hover {
  background: rgba(6, 182, 212, 0.35);
}

.btn-score.plus-2 {
  background: rgba(255, 102, 0, 0.2);
  border: 1px solid rgba(255, 102, 0, 0.45);
  color: var(--accent-violet);
}
.btn-score.plus-2:hover {
  background: rgba(255, 102, 0, 0.35);
}

.btn-score.plus-5 {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: var(--accent-amber);
}
.btn-score.plus-5:hover {
  background: rgba(245, 158, 11, 0.35);
}

.btn-score.minus-1 {
  grid-column: span 3;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: var(--accent-red);
  font-size: 0.95rem;
  font-weight: 600;
  height: 38px;
  margin-top: 4px;
}
.btn-score.minus-1:hover {
  background: rgba(239, 68, 68, 0.3);
}

.delete-team-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 1rem;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s;
}

.team-card:hover .delete-team-btn {
  opacity: 1;
}

.delete-team-btn:hover {
  color: var(--accent-red);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 9, 20, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  width: 90%;
  max-width: 450px;
  padding: 30px;
  border: 1px solid var(--border-color);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 600;
}

.form-input {
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-main);
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-violet);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 30px;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(22, 19, 38, 0.9);
  border: 1px solid var(--accent-violet);
  padding: 12px 24px;
  border-radius: 30px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  color: var(--text-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 10000;
  pointer-events: none;
}

.toast.active {
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 600px) {
  .control-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .teams-grid {
    grid-template-columns: 1fr;
  }
  .delete-team-btn {
    opacity: 1; /* Always visible on mobile */
  }
}

[data-theme="dark"] .btn-score.plus-1 {
  background: rgba(6, 182, 212, 0.15) !important;
  border: 1px solid rgba(6, 182, 212, 0.3) !important;
}
[data-theme="dark"] .btn-score.plus-1:hover {
  background: rgba(6, 182, 212, 0.3) !important;
}

[data-theme="dark"] .btn-score.plus-2 {
  background: rgba(255, 102, 0, 0.15) !important;
  border: 1px solid rgba(255, 102, 0, 0.3) !important;
}
[data-theme="dark"] .btn-score.plus-2:hover {
  background: rgba(255, 102, 0, 0.3) !important;
}

[data-theme="dark"] .btn-score.plus-5 {
  background: rgba(245, 158, 11, 0.15) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
}
[data-theme="dark"] .btn-score.plus-5:hover {
  background: rgba(245, 158, 11, 0.3) !important;
}

[data-theme="dark"] .btn-score.minus-1 {
  background: rgba(239, 68, 68, 0.1) !important;
  border: 1px solid rgba(239, 68, 68, 0.2) !important;
}
[data-theme="dark"] .btn-score.minus-1:hover {
  background: rgba(239, 68, 68, 0.25) !important;
}

/* Premium Login Modal Overlay styling with high blur & backdrop isolation */
.modal-overlay.login-modal {
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  background: rgba(11, 9, 20, 0.94);
  z-index: 2000; /* Ensure it is above all other modals */
}
