/* Schedule-specific styles */

.controls-bar {
  display: flex;
  gap: 15px;
  align-items: center;
  padding: 20px;
  background: white;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.control-group label {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.control-group select,
.control-group input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  min-width: 150px;
}

/* Week View */
.week-view {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.week-header {
  display: grid;
  grid-template-columns: 100px repeat(7, 1fr);
  gap: 1px;
  background: #e0e0e0;
  margin-bottom: 1px;
}

.week-header-cell {
  background: white;
  padding: 15px;
  text-align: center;
  font-weight: 600;
  border-bottom: 2px solid #0984e3;
}

.week-grid {
  display: grid;
  grid-template-columns: 100px repeat(7, 1fr);
  gap: 1px;
  background: #e0e0e0;
}

.time-label {
  background: white;
  padding: 10px;
  text-align: right;
  font-size: 12px;
  color: #666;
  border-right: 2px solid #e0e0e0;
}

.day-cell {
  background: white;
  padding: 5px;
  min-height: 60px;
  position: relative;
  transition: background 0.2s;
}

.day-cell:hover {
  background: #f8f9fa;
}

.day-cell.weekend {
  background: #f5f5f5;
}

.booking-block {
  background: linear-gradient(135deg, #0984e3 0%, #6c5ce7 100%);
  color: white;
  padding: 5px;
  margin: 2px 0;
  border-radius: 3px;
  font-size: 11px;
  cursor: pointer;
  transition: transform 0.2s;
}

.booking-block:hover {
  transform: scale(1.02);
}

.unavailable-block {
  background: linear-gradient(135deg, #d63031 0%, #e17055 100%);
  color: white;
  padding: 5px;
  margin: 2px 0;
  border-radius: 3px;
  font-size: 11px;
}

/* Schedule Section */
.schedule-section {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.3s;
}

.tab-btn:hover {
  color: #0984e3;
}

.tab-btn.active {
  color: #0984e3;
  border-bottom-color: #0984e3;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.schedule-table thead {
  background: linear-gradient(135deg, #0984e3 0%, #6c5ce7 100%);
  color: white;
}

.schedule-table th,
.schedule-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.schedule-table tbody tr:hover {
  background: #f8f9fa;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-confirmed { background: #d4edda; color: #155724; }
.status-assigned { background: #d1ecf1; color: #0c5460; }
.status-in_progress { background: #cce5ff; color: #004085; }

.available-yes { background: #d4edda; color: #155724; }
.available-no { background: #f8d7da; color: #721c24; }

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-danger {
  background: linear-gradient(135deg, #d63031 0%, #e17055 100%);
  color: white;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #c0392b 0%, #d35400 100%);
}

/* Conflict Checker */
.conflict-checker {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.conflict-form {
  display: flex;
  gap: 15px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.form-group input,
.form-group select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.conflict-result {
  padding: 15px;
  border-radius: 6px;
  font-weight: 500;
  display: none;
}

.conflict-result.show {
  display: block;
}

.conflict-result.no-conflict {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.conflict-result.has-conflict {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 28px;
  font-weight: bold;
  color: #999;
  cursor: pointer;
  transition: color 0.3s;
}

.close:hover {
  color: #333;
}

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

/* Responsive */
@media (max-width: 768px) {
  .week-header,
  .week-grid {
    grid-template-columns: 60px repeat(7, 1fr);
  }
  
  .controls-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .control-group {
    width: 100%;
  }
  
  .conflict-form {
    flex-direction: column;
  }
  
  .form-group {
    width: 100%;
  }
}
