/* Custom styles for Korean Tutor Platform */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Loading spinner */
.spinner {
  border: 3px solid #f3f4f6;
  border-top: 3px solid #2563eb;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Custom button hover effects */
.btn-primary {
  @apply bg-blue-600 text-white px-6 py-3 rounded-lg font-semibold;
  @apply hover:bg-blue-700 transition shadow-md hover:shadow-lg;
}

.btn-secondary {
  @apply bg-gray-200 text-gray-800 px-6 py-3 rounded-lg font-semibold;
  @apply hover:bg-gray-300 transition;
}

/* Card styles */
.card {
  @apply bg-white rounded-lg shadow-md p-6;
  @apply hover:shadow-xl transition;
}

/* Input styles */
.input {
  @apply w-full border border-gray-300 rounded-lg px-4 py-2.5;
  @apply focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent;
}

.input-error {
  @apply border-red-500 focus:ring-red-500;
}

/* Alert styles */
.alert {
  @apply p-4 rounded-lg mb-4;
}

.alert-success {
  @apply bg-green-50 text-green-800 border border-green-200;
}

.alert-error {
  @apply bg-red-50 text-red-800 border border-red-200;
}

.alert-info {
  @apply bg-blue-50 text-blue-800 border border-blue-200;
}

/* Badge styles */
.badge {
  @apply inline-block px-3 py-1 rounded-full text-sm font-semibold;
}

.badge-blue {
  @apply bg-blue-100 text-blue-800;
}

.badge-green {
  @apply bg-green-100 text-green-800;
}

.badge-yellow {
  @apply bg-yellow-100 text-yellow-800;
}

.badge-red {
  @apply bg-red-100 text-red-800;
}

/* Star rating */
.star-rating {
  display: inline-flex;
  gap: 2px;
}

.star {
  color: #fbbf24;
  font-size: 1.25rem;
}

.star-empty {
  color: #d1d5db;
}

/* Avatar */
.avatar {
  @apply rounded-full object-cover;
}

.avatar-sm {
  @apply w-10 h-10;
}

.avatar-md {
  @apply w-16 h-16;
}

.avatar-lg {
  @apply w-24 h-24;
}

/* Mobile menu */
@media (max-width: 768px) {
  .mobile-menu {
    @apply fixed inset-0 bg-white z-50;
    @apply transform transition-transform;
  }

  .mobile-menu.closed {
    @apply translate-x-full;
  }
}

/* Utility classes */
.container {
  @apply max-w-7xl mx-auto;
}

.text-gradient {
  @apply bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent;
}

/* Hide scrollbar but keep functionality */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Booking Calendar Styles */
.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  margin: 1px auto;
  width: 36px;
  height: 36px;
}

@media (min-width: 768px) {
  .calendar-day {
    width: 42px;
    height: 42px;
    font-size: 0.9rem;
    margin: 2px auto;
  }
}

.calendar-day-available {
  background-color: white;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.calendar-day-available:hover {
  background-color: #fff7ed;
  border-color: #f97316;
  transform: scale(1.05);
}

.calendar-day-selected {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
  transform: scale(1.05);
}

.calendar-day-disabled {
  background-color: transparent;
  color: #d1d5db;
  cursor: not-allowed;
  border: none;
}

.calendar-day-today:not(.calendar-day-selected) {
  border: 2px solid #f97316;
  font-weight: 700;
  color: #f97316;
}

/* Time Slot Styles */
.time-slot {
  padding: 0.6rem 0.5rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  text-align: center;
  font-weight: 500;
  font-size: 0.8rem;
  transition: all 0.15s ease;
  cursor: pointer;
  background-color: white;
}

@media (min-width: 768px) {
  .time-slot {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
}

.time-slot:hover {
  border-color: #fdba74;
  background-color: #fff7ed;
}

.time-slot-selected {
  border-color: #f97316 !important;
  background-color: #f97316 !important;
  color: white !important;
}

.time-slot-unavailable {
  border-color: #f3f4f6;
  background-color: #f9fafb;
  color: #d1d5db;
  cursor: not-allowed;
}
