/* Ultimate College Schedule Maker - WordPress Plugin Styles */

.ucsm-container {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-sizing: border-box;
  line-height: 1.5;
  color: #1f2937;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.ucsm-container *,
.ucsm-container *::before,
.ucsm-container *::after {
  box-sizing: border-box;
}

.ucsm-schedule-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  min-height: 600px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
}

/* Schedule Grid */
.ucsm-grid {
  display: grid;
  grid-template-columns: 80px repeat(7, 1fr);
  gap: 1px;
  background: #f3f4f6;
  border-radius: 8px;
  overflow: hidden;
}

.ucsm-time-slot {
  background: #ffffff;
  padding: 8px;
  border-right: 1px solid #e5e7eb;
  font-size: 12px;
  color: #6b7280;
  text-align: center;
}

.ucsm-day-header {
  background: #f9fafb;
  padding: 12px 8px;
  font-weight: 600;
  text-align: center;
  color: #374151;
  border-bottom: 2px solid #e5e7eb;
}

.ucsm-course-slot {
  background: #ffffff;
  border: 1px solid #f3f4f6;
  position: relative;
  min-height: 60px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.ucsm-course-slot:hover {
  background: #f9fafb;
}

/* Course Blocks */
.ucsm-course-block {
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  background: #3b82f6;
  color: white;
  padding: 8px;
  border-radius: 6px;
  cursor: move;
  font-size: 12px;
  line-height: 1.3;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  min-height: 56px;
}

.ucsm-course-block:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.ucsm-course-name {
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ucsm-course-instructor {
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ucsm-course-location {
  opacity: 0.8;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Toolbar */
.ucsm-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  flex-wrap: wrap;
  gap: 12px;
}

.ucsm-title {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.ucsm-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 4px 0 0 0;
}

.ucsm-button-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Buttons */
.ucsm-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  background: #3b82f6;
  color: white;
}

.ucsm-button:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.ucsm-button-secondary {
  background: #6b7280;
  color: white;
}

.ucsm-button-secondary:hover {
  background: #4b5563;
}

.ucsm-button-outline {
  background: transparent;
  color: #3b82f6;
  border: 1px solid #3b82f6;
}

.ucsm-button-outline:hover {
  background: #3b82f6;
  color: white;
}

/* Course Colors */
.ucsm-math { background: #3b82f6; }
.ucsm-science { background: #10b981; }
.ucsm-literature { background: #8b5cf6; }
.ucsm-history { background: #f59e0b; }
.ucsm-arts { background: #ec4899; }
.ucsm-other { background: #84cc16; }

/* Responsive Design */
@media (max-width: 768px) {
  .ucsm-schedule-wrapper {
    min-height: 500px;
  }
  
  .ucsm-grid {
    font-size: 12px;
  }
  
  .ucsm-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .ucsm-button-group {
    justify-content: center;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .ucsm-container {
    color: #f9fafb;
  }
  
  .ucsm-schedule-wrapper {
    background: #1f2937;
    border-color: #374151;
  }
  
  .ucsm-toolbar {
    background: #111827;
    border-color: #374151;
  }
  
  .ucsm-day-header {
    background: #374151;
    color: #f9fafb;
    border-color: #4b5563;
  }
  
  .ucsm-course-slot {
    background: #1f2937;
    border-color: #374151;
  }
  
  .ucsm-course-slot:hover {
    background: #374151;
  }
  
  .ucsm-time-slot {
    background: #1f2937;
    color: #9ca3af;
    border-color: #374151;
  }
}

/* Loading Animation */
@keyframes ucsm-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.ucsm-spinner {
  animation: ucsm-spin 1s linear infinite;
}

/* Modal and Dialog Overrides */
.ucsm-container .modal {
  z-index: 999999;
}

.ucsm-container .dialog {
  z-index: 999999;
}