/**
 * MingleTiles Lesson Scheduler - Storefront Widget Styles
 * Matches MingleTiles brand design system
 */

/* ============================================================
   WIDGET CONTAINER
   ============================================================ */
.lesson-slots {
  margin: 2rem 0;
  padding: 2rem;
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lesson-slots__header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.lesson-slots__title {
  font-family: 'Red Hat Display', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #1800AD;
  margin: 0 0 0.5rem 0;
}

.lesson-slots__subtitle {
  font-size: 1rem;
  color: #2D3142;
  opacity: 0.7;
  margin: 0;
}

/* ============================================================
   LOADING STATE
   ============================================================ */
.lesson-slots__loading {
  text-align: center;
  padding: 3rem 1rem;
}

.lesson-slots__spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 1rem;
  border: 4px solid #F8F9FA;
  border-top-color: #1800AD;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.lesson-slots__loading p {
  color: #2D3142;
  opacity: 0.7;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.lesson-slots__empty {
  text-align: center;
  padding: 3rem 1rem;
}

.lesson-slots__empty-text {
  font-size: 1rem;
  color: #2D3142;
  opacity: 0.7;
  margin: 0;
}

/* ============================================================
   ERROR STATE
   ============================================================ */
.lesson-slots__error {
  text-align: center;
  padding: 2rem 1rem;
  background: rgba(244, 67, 54, 0.1);
  border-radius: 8px;
}

.lesson-slots__error-text {
  font-size: 1rem;
  color: #F44336;
  margin: 0;
}

/* ============================================================
   SLOTS LIST
   ============================================================ */
.lesson-slots__list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.lesson-slot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: #F8F9FA;
  border-radius: 12px;
  transition: all 0.3s ease;
  gap: 1rem;
}

.lesson-slot:hover {
  background: #FFFFFF;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.lesson-slot__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lesson-slot__date {
  font-family: 'Red Hat Display', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1800AD;
}

.lesson-slot__time {
  font-size: 1rem;
  font-weight: 600;
  color: #2D3142;
}

.lesson-slot__capacity {
  font-size: 0.875rem;
  color: #7ED957;
  font-weight: 600;
}

/* ============================================================
   BOOK BUTTON
   ============================================================ */
.lesson-slot__book {
  padding: 0.875rem 2rem;
  font-family: 'Red Hat Display', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: white;
  background: #7ED957;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(126, 217, 87, 0.3);
}

.lesson-slot__book:hover {
  background: #7ED957;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(126, 217, 87, 0.4);
}

.lesson-slot__book:active {
  transform: translateY(0);
}

.lesson-slot__book:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.lesson-slot__book--success {
  background: #7ED957;
}

.lesson-slot__book--error {
  background: #F44336;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .lesson-slots {
    padding: 1.5rem;
    margin: 1.5rem 0;
  }
  
  .lesson-slots__title {
    font-size: 1.5rem;
  }
  
  .lesson-slot {
    flex-direction: column;
    align-items: stretch;
    padding: 1.25rem;
  }
  
  .lesson-slot__info {
    text-align: center;
  }
  
  .lesson-slot__book {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .lesson-slots {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 8px;
  }
  
  .lesson-slots__title {
    font-size: 1.25rem;
  }
  
  .lesson-slot {
    padding: 1rem;
  }
  
  .lesson-slot__date {
    font-size: 1rem;
  }
  
  .lesson-slot__time {
    font-size: 0.875rem;
  }
  
  .lesson-slot__book {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }
}

/* ============================================================
   THEME INTEGRATION
   ============================================================ */
/* Ensure widget inherits theme fonts if available */
.lesson-slots * {
  font-family: var(--font-body, 'Red Hat Display', -apple-system, BlinkMacSystemFont, sans-serif);
}

/* Respect theme button styles if they exist */
.lesson-slot__book.button {
  /* Override theme button styles if needed */
  background: #7ED957 !important;
  color: white !important;
}
