/* Calendar View Styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.calendar-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem;
  animation: fadeInUp 0.6s ease-out;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  padding: 2.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.calendar-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}

.calendar-header-content {
  position: relative;
  z-index: 1;
}

.calendar-icon {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  display: inline-block;
  animation: pulse 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.calendar-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  margin: 0;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.calendar-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.9);
  margin-top: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.add-slot-btn {
  position: relative;
  z-index: 1;
  background: white;
  color: #667eea;
  padding: 1rem 2rem;
  border-radius: 16px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 3px solid rgba(255,255,255,0.3);
}

.add-slot-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 15px 40px rgba(0,0,0,0.25);
  background: #f8f9ff;
}

.add-slot-btn::before {
  content: '+';
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
}

/* Stats Cards */
.calendar-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.calendar-stat-card {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 2px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.calendar-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.calendar-stat-card.available::before {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.calendar-stat-card.busy::before {
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.calendar-stat-card.total::before {
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.calendar-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.calendar-stat-icon {
  font-size: 3rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.calendar-stat-content {
  flex: 1;
}

.calendar-stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.calendar-stat-label {
  font-size: 0.9375rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Date Groups */
.date-group {
  margin-bottom: 3rem;
  animation: fadeInUp 0.6s ease-out both;
}

.date-group.past {
  opacity: 0.7;
}

.date-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1.5rem 2rem;
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  border-left: 5px solid #667eea;
}

.date-group.today .date-header {
  background: linear-gradient(135deg, #fef3c7 0%, #ffffff 100%);
  border-left-color: #f59e0b;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.2);
}

.date-group.past .date-header {
  background: #f8fafc;
  border-left-color: #94a3b8;
}

.date-label {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.date-day {
  font-size: 3rem;
  font-weight: 800;
  color: #667eea;
  line-height: 1;
  min-width: 70px;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.date-group.today .date-day {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.date-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.date-month {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.01em;
}

.date-weekday {
  font-size: 0.9375rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.date-badge {
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.today-badge {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
}

.tomorrow-badge {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.past-badge {
  background: #e2e8f0;
  color: #64748b;
}

.calendar-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1.5rem;
}

.calendar-slot-card {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 2px solid transparent;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: default;
}

.calendar-slot-card.happening-now {
  border: 2px solid #f59e0b;
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.25);
  animation: pulse 2s ease-in-out infinite;
}

.calendar-slot-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  transition: width 0.3s ease;
}

.calendar-slot-card.available::before {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
}

.calendar-slot-card.busy::before {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
}

.calendar-slot-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  border-color: rgba(102, 126, 234, 0.2);
}

.calendar-slot-card:hover::before {
  width: 100%;
  opacity: 0.05;
}

.calendar-slot-card.available {
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.calendar-slot-card.busy {
  background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
}

.slot-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 1.5rem;
}

.slot-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.slot-status.available {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.slot-status.busy {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.happening-now-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  animation: pulse 2s ease-in-out infinite;
}

.slot-actions {
  display: flex;
  gap: 0.5rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.calendar-slot-card:hover .slot-actions {
  opacity: 1;
}

.slot-action-btn {
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 2px solid;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.slot-action-btn.edit {
  color: #667eea;
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.05);
}

.slot-action-btn.edit:hover {
  background: #667eea;
  color: white;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.slot-action-btn.delete {
  color: #ef4444;
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
}

.slot-action-btn.delete:hover {
  background: #ef4444;
  color: white;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.slot-time-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 16px;
  border-left: 4px solid #667eea;
}

.slot-time-icon {
  font-size: 2rem;
  opacity: 0.8;
}

.slot-time {
  font-size: 1.375rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  letter-spacing: -0.02em;
  margin-bottom: 0.375rem;
}

.slot-duration {
  color: #667eea;
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.slot-duration::before {
  content: '⏱️';
  font-size: 1rem;
}

.slot-title {
  font-weight: 700;
  color: #0f172a;
  margin: 1.5rem 0 0.75rem;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.slot-description {
  color: #64748b;
  font-size: 0.9375rem;
  line-height: 1.7;
  padding: 1rem;
  background: rgba(0,0,0,0.02);
  border-radius: 12px;
  border-left: 3px solid rgba(102, 126, 234, 0.3);
}

.empty-calendar {
  text-align: center;
  padding: 6rem 2rem;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border-radius: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 2px dashed rgba(102, 126, 234, 0.2);
  animation: fadeInUp 0.8s ease-out;
}

.empty-calendar-icon {
  font-size: 6rem;
  margin-bottom: 1.5rem;
  display: inline-block;
  animation: pulse 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.1));
}

.empty-calendar-title {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.empty-calendar-text {
  color: #64748b;
  font-size: 1.125rem;
  margin-bottom: 2.5rem;
  line-height: 1.7;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.empty-calendar-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1.125rem 2.5rem;
  border-radius: 16px;
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
}

.empty-calendar-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.empty-calendar-btn::before {
  content: '+';
  font-size: 1.75rem;
  font-weight: 600;
}

/* Form Page Styles */
.form-page-container {
  animation: fadeInUp 0.6s ease-out;
  max-width: 800px;
  margin: 0 auto;
}

.form-header {
  margin-bottom: 2.5rem;
  padding: 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(102, 126, 234, 0.2);
}

.form-header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: white;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.form-header p {
  color: rgba(255,255,255,0.9);
  margin: 0;
  font-size: 1.0625rem;
}

.form-card {
  background: white;
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0,0,0,0.05);
}

.form-group {
  margin-bottom: 2rem;
}

.form-label {
  display: block;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.form-input, 
.form-textarea, 
.form-select {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
  font-family: inherit;
}

.form-input:focus, 
.form-textarea:focus, 
.form-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}

.form-helper {
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.form-helper::before {
  content: '💡';
  font-size: 0.875rem;
}

.form-error {
  font-size: 0.875rem;
  color: #ef4444;
  margin-top: 0.5rem;
  font-weight: 500;
}

.form-errors {
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.form-errors h3 {
  color: #dc2626;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.form-errors ul {
  margin-left: 1.5rem;
  color: #dc2626;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #f1f5f9;
}

.status-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.75rem;
}

.status-option {
  position: relative;
}

.status-option input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.status-option label {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
}

.status-option label:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.status-option input[type="radio"]:checked + label {
  border-color: #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(255,255,255,1) 100%);
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
}

.status-icon {
  font-size: 2rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.status-text {
  flex: 1;
}

.status-title {
  font-weight: 700;
  color: #0f172a;
  font-size: 1.0625rem;
  margin-bottom: 0.25rem;
}

.status-description {
  font-size: 0.875rem;
  color: #64748b;
}

.form-submit-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 2.5rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
  font-family: inherit;
}

.form-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

.form-cancel-btn {
  background: white;
  color: #64748b;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid #e2e8f0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-cancel-btn:hover {
  border-color: #cbd5e1;
  color: #475569;
  transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .calendar-header {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
    padding: 2rem 1.5rem;
  }

  .calendar-title {
    font-size: 2rem;
  }

  .add-slot-btn {
    width: 100%;
    justify-content: center;
  }

  .slot-time-container {
    flex-direction: column;
    text-align: center;
  }

  .calendar-slots-grid {
    grid-template-columns: 1fr;
  }
  
  .calendar-stats {
    grid-template-columns: 1fr;
  }
  
  .date-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .status-options {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-card {
    padding: 1.5rem;
  }
}
