/* AdaptiveTutor - Global CSS */

/* Custom CSS Variables */
:root {
  --stripe-blue: #635bff;
  --stripe-blue-hover: #5a54e6;
  --stripe-blue-light: #f6f9fc;
}

/* Base styles */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  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;
  height: 100%;
}

#root {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Mobile-first responsive improvements */
@media (max-width: 768px) {
  /* Improve touch targets on mobile */
  button, input, select, textarea {
    min-height: 44px !important;
    min-width: 44px !important;
  }
  
  /* Better mobile padding and margins */
  .max-w-7xl {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Responsive text sizing */
  h1 { font-size: 1.5rem !important; }
  h2 { font-size: 1.25rem !important; }
  h3 { font-size: 1.125rem !important; }
  
  /* Mobile-friendly modals */
  .modal-content {
    margin: 1rem !important;
    max-height: calc(100vh - 2rem) !important;
    overflow-y: auto !important;
  }
}

/* Stripe Connect specific styles */
.bg-stripe-blue {
  background-color: var(--stripe-blue) !important;
}

.bg-stripe-blue:hover {
  background-color: var(--stripe-blue-hover) !important;
}

.text-stripe-blue {
  color: var(--stripe-blue) !important;
}

.border-stripe-blue {
  border-color: var(--stripe-blue) !important;
}
  
  /* Better mobile form spacing */
  .space-y-4 > * + * {
    margin-top: 1.5rem !important;
  }
  
  /* Mobile-friendly tables */
  table {
    font-size: 0.875rem !important;
  }
}

/* Loading states */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Error states */
.error {
  color: #e74c3c;
  text-align: center;
  padding: 20px;
}

/* Success states */
.success {
  color: #27ae60;
  text-align: center;
  padding: 20px;
}

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-4 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1rem; }
.p-4 { padding: 1rem; }

.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }

/* PWA specific styles */
.pwa-install-prompt {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 1000;
}

/* IMPROVED BUTTON STYLING - HIGH CONTRAST & BETTER COLORS */
@media (prefers-color-scheme: light), (prefers-color-scheme: no-preference) {
  /* Primary buttons - better blue with high contrast */
  html body button:not([class*="bg-red"]):not([class*="bg-green"]):not([class*="danger"]):not(.delete-btn):not([class*="bg-gray"]),
  html body input[type="button"]:not([class*="bg-red"]):not([class*="bg-green"]):not([class*="bg-gray"]),
  html body input[type="submit"]:not([class*="bg-red"]):not([class*="bg-green"]):not([class*="bg-gray"]),
  html body [role="button"]:not([class*="bg-red"]):not([class*="bg-green"]):not([class*="bg-gray"]) {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: #ffffff !important;
    border: 1px solid #1e40af !important;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3) !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  }
  
  /* Force white text on all child elements */
  html body button:not([class*="bg-red"]):not([class*="bg-green"]):not([class*="danger"]):not(.delete-btn):not([class*="bg-gray"]) *,
  html body input[type="button"]:not([class*="bg-red"]):not([class*="bg-green"]):not([class*="bg-gray"]) *,
  html body input[type="submit"]:not([class*="bg-red"]):not([class*="bg-green"]):not([class*="bg-gray"]) *,
  html body [role="button"]:not([class*="bg-red"]):not([class*="bg-green"]):not([class*="bg-gray"]) * {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  }
  
  html body button:not([class*="bg-red"]):not([class*="bg-green"]):not([class*="danger"]):not(.delete-btn):not([class*="bg-gray"]):hover,
  html body input[type="button"]:not([class*="bg-red"]):not([class*="bg-green"]):not([class*="bg-gray"]):hover,
  html body input[type="submit"]:not([class*="bg-red"]):not([class*="bg-green"]):not([class*="bg-gray"]):hover {
    background: linear-gradient(135deg, #1d4ed8, #1e3a8a) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.4) !important;
    transform: translateY(-1px) !important;
    transition: all 0.2s ease !important;
  }
  
  /* Force white text on hover child elements */
  html body button:not([class*="bg-red"]):not([class*="bg-green"]):not([class*="danger"]):not(.delete-btn):not([class*="bg-gray"]):hover *,
  html body input[type="button"]:not([class*="bg-red"]):not([class*="bg-green"]):not([class*="bg-gray"]):hover *,
  html body input[type="submit"]:not([class*="bg-red"]):not([class*="bg-green"]):not([class*="bg-gray"]):hover * {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  }
  
  /* Secondary/Gray buttons - better contrast */
  html body button[class*="bg-gray"],
  html body .secondary-btn {
    background: linear-gradient(135deg, #6b7280, #4b5563) !important;
    color: #ffffff !important;
    border: 1px solid #374151 !important;
    box-shadow: 0 2px 4px rgba(107, 114, 128, 0.3) !important;
    font-weight: 500 !important;
  }
  
  html body button[class*="bg-gray"]:hover,
  html body .secondary-btn:hover {
    background: linear-gradient(135deg, #4b5563, #374151) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 8px rgba(107, 114, 128, 0.4) !important;
  }
  
  /* Success/Green buttons - better green */
  html body button[class*="bg-green"],
  html body button[class*="success"] {
    background: linear-gradient(135deg, #059669, #047857) !important;
    color: #ffffff !important;
    border: 1px solid #065f46 !important;
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.3) !important;
    font-weight: 500 !important;
  }
  
  /* Danger/Red buttons - keep existing styling */
  html body button[class*="red"], 
  html body button[class*="danger"],
  html body .btn-danger,
  html body .delete-btn {
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
    color: #ffffff !important;
    border: 1px solid #991b1b !important;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3) !important;
    font-weight: 500 !important;
  }
  
  /* Special styling for course purchase buttons */
  html body .modal button,
  html body .course-modal button,
  html body .purchase-btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: #ffffff !important;
    border: 1px solid #1e40af !important;
    box-shadow: 0 3px 6px rgba(37, 99, 235, 0.4) !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  }
  
  /* Force white text on modal button child elements */
  html body .modal button *,
  html body .course-modal button *,
  html body .purchase-btn * {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  }
  
  html body .modal button:hover,
  html body .course-modal button:hover,
  html body .purchase-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e3a8a) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.5) !important;
    transform: translateY(-2px) !important;
  }
  
  /* Force white text on modal button hover child elements */
  html body .modal button:hover *,
  html body .course-modal button:hover *,
  html body .purchase-btn:hover * {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  }
}

@media (prefers-color-scheme: dark) {
  body {
    background-color: #1a1a1a;
    color: #ffffff;
  }
  
  .pwa-install-prompt {
    background: #2d2d2d;
    border-color: #404040;
    color: #ffffff;
  }
}

/* Custom animation delays for kid-friendly spinner */
.animation-delay-150 {
  animation-delay: 150ms;
}

.animation-delay-300 {
  animation-delay: 300ms;
} 
 / *   P a y w a l l   a n i m a t i o n s   * /  
 @ k e y f r a m e s   f a d e I n   {  
     f r o m   {   o p a c i t y :   0 ;   t r a n s f o r m :   s c a l e ( 0 . 9 5 ) ;   }  
     t o   {   o p a c i t y :   1 ;   t r a n s f o r m :   s c a l e ( 1 ) ;   }  
 }  
  
 . a n i m a t e - f a d e - i n   {  
     a n i m a t i o n :   f a d e I n   0 . 3 s   e a s e - i n - o u t ;  
 }  
 