/*
 * ChoristerCorner - Custom Tailwind-inspired CSS
 * Production-ready replacement for Tailwind CDN
 * Contains only the utility classes actually used in the application
 */

/* Reset and base styles */
*, *::before, *::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: #e5e7eb;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

body {
  margin: 0;
  line-height: inherit;
}

/* Display utilities */
.hidden { display: none; }
.block { display: block; }
.inline-flex { display: inline-flex; }
.flex { display: flex; }
.grid { display: grid; }

/* Flexbox utilities */
.flex-1 { flex: 1 1 0%; }
.flex-col { flex-direction: column; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-baseline { align-items: baseline; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* Grid utilities */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Gap utilities */
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* Spacing utilities */
.space-x-2 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.5rem; }
.space-x-3 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.75rem; }
.space-x-4 > :not([hidden]) ~ :not([hidden]) { margin-left: 1rem; }
.space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.25rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }
.space-y-8 > :not([hidden]) ~ :not([hidden]) { margin-top: 2rem; }

/* Divide utilities */
.divide-y > :not([hidden]) ~ :not([hidden]) { 
  border-top-width: 1px; 
  border-bottom-width: 0; 
}
.divide-gray-200 > :not([hidden]) ~ :not([hidden]) { 
  border-color: rgb(229 231 235); 
}

/* Gap utilities */
.gap-0 { gap: 0px; }
.gap-3 { gap: 0.75rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Padding utilities */
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.pt-2 { padding-top: 0.5rem; }
.pb-3 { padding-bottom: 0.75rem; }

/* Margin utilities */
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }
.mt-auto { margin-top: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.ml-10 { margin-left: 2.5rem; }

/* Width and height utilities */
.w-full { width: 100%; }
.min-w-0 { min-width: 0px; }
.h-16 { height: 4rem; }
.min-h-screen { min-height: 100vh; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-7xl { max-width: 80rem; }

/* Position utilities */
.sticky { position: sticky; }
.fixed { position: fixed; }
.top-0 { top: 0px; }
.bottom-0 { bottom: 0px; }
.left-0 { left: 0px; }
.right-0 { right: 0px; }

/* Z-index utilities */
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

/* Background utilities */
.bg-white { background-color: rgb(255 255 255); }
.bg-gray-50 { background-color: rgb(249 250 251); }
.bg-gray-100 { background-color: rgb(243 244 246); }
.bg-yellow-50 { background-color: rgb(254 252 232); }
.bg-black { background-color: rgb(0 0 0); }

/* Background gradients */
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)); }
.from-blue-50 { --tw-gradient-from: rgb(239 246 255); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgb(239 246 255 / 0)); }
.to-purple-50 { --tw-gradient-to: rgb(250 245 255); }

/* Text colors */
.text-gray-400 { color: rgb(156 163 175); }
.text-gray-500 { color: rgb(107 114 128); }
.text-gray-600 { color: rgb(75 85 99); }
.text-gray-700 { color: rgb(55 65 81); }
.text-gray-800 { color: rgb(31 41 55); }
.text-gray-900 { color: rgb(17 24 39); }
.text-purple-600 { color: rgb(147 51 234); }
.text-purple-700 { color: rgb(126 34 206); }
.text-blue-600 { color: rgb(37 99 235); }
.text-green-600 { color: rgb(22 163 74); }
.text-orange-600 { color: rgb(234 88 12); }
.text-red-500 { color: rgb(239 68 68); }
.text-yellow-600 { color: rgb(202 138 4); }
.text-yellow-800 { color: rgb(133 77 14); }
.text-white { color: rgb(255 255 255); }

/* Font utilities */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-6xl { font-size: 3.75rem; line-height: 1; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Text alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.truncate { 
  overflow: hidden; 
  text-overflow: ellipsis; 
  white-space: nowrap; 
}

/* Border utilities */
.border { border-width: 1px; }
.border-t { border-top-width: 1px; }
.border-r { border-right-width: 1px; }
.border-gray-200 { border-color: rgb(229 231 235); }
.border-gray-300 { border-color: rgb(209 213 219); }
.border-yellow-200 { border-color: rgb(254 240 138); }

/* Border radius */
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-l-md { border-top-left-radius: 0.375rem; border-bottom-left-radius: 0.375rem; }
.rounded-r-md { border-top-right-radius: 0.375rem; border-bottom-right-radius: 0.375rem; }

/* Shadow utilities */
.shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25); }

/* Hover utilities */
.hover\:text-purple-600:hover { color: rgb(147 51 234); }
.hover\:bg-gray-50:hover { background-color: rgb(249 250 251); }
.hover\:bg-gray-100:hover { background-color: rgb(243 244 246); }
.hover\:shadow-lg:hover { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }

/* Transition utilities */
.transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-shadow { transition-property: box-shadow; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }

/* Transform utilities */
.transform { transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); }
.scale-105 { --tw-scale-x: 1.05; --tw-scale-y: 1.05; transform: scale(1.05); }
.translate-y-full { --tw-translate-y: 100%; }

/* Hover transform utilities */
.hover\:scale-105:hover { transform: scale(1.05); }

/* Animation utilities */
.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* Responsive utilities */
@media (min-width: 640px) {
  .sm\:block { display: block; }
  .sm\:px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:px-0 { padding-left: 0px; padding-right: 0px; }
}

@media (min-width: 768px) {
  .md\:hidden { display: none; }
  .md\:block { display: block; }
  .md\:flex-row { flex-direction: row; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:mb-0 { margin-bottom: 0px; }
  .md\:col-span-2 { grid-column: span 2 / span 2; }
}

@media (min-width: 1024px) {
  .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:col-span-2 { grid-column: span 2 / span 2; }
}

/* Overflow utilities */
.overflow-y-auto { overflow-y: auto; }

/* Additional utility classes for fade-in animation */
.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

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

/* Custom form utilities */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(17 24 39);
  margin-bottom: 0.25rem;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgb(209 213 219);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: border-color 150ms;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: rgb(147 51 234);
  box-shadow: 0 0 0 3px rgb(147 51 234 / 0.1);
}

.form-help {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: rgb(107 114 128);
}

/* Button utilities */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 150ms;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
}

.btn-primary {
  background-color: rgb(147 51 234);
  color: white;
}

.btn-primary:hover {
  background-color: rgb(126 34 206);
}

.btn-secondary {
  background-color: rgb(99 102 241);
  color: white;
}

.btn-secondary:hover {
  background-color: rgb(79 70 229);
}

.btn-outline {
  border-color: rgb(209 213 219);
  color: rgb(55 65 81);
}

.btn-outline:hover {
  background-color: rgb(243 244 246);
}

.btn-ghost {
  color: rgb(107 114 128);
}

.btn-ghost:hover {
  background-color: rgb(243 244 246);
  color: rgb(17 24 39);
}

/* Card utilities */
.card {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgb(229 231 235);
}

.card-body {
  padding: 1.5rem;
}

/* Navigation utilities */
.nav-tab {
  position: relative;
  text-decoration: none;
}

.nav-tab.active {
  color: rgb(147 51 234);
  background-color: rgb(250 245 255);
}

.mobile-nav-tab {
  position: relative;
  text-decoration: none;
}

.mobile-nav-tab.active {
  color: rgb(147 51 234);
  background-color: rgb(250 245 255);
}

/* Line clamp utility */
.line-clamp-1 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

/* Duration utilities */
.duration-300 { transition-duration: 300ms; }

/* Position utilities for transforms */
.relative { position: relative; }
.absolute { position: absolute; }
.left-3 { left: 0.75rem; }
.top-1\/2 { top: 50%; }
.-translate-y-1\/2 { --tw-translate-y: -50%; }

/* Additional input and select styling */
.input, .select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgb(209 213 219);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: border-color 150ms;
  background-color: white;
}

.input:focus, .select:focus {
  outline: none;
  border-color: rgb(147 51 234);
  box-shadow: 0 0 0 3px rgb(147 51 234 / 0.1);
}

.input-bordered, .select-bordered {
  border-color: rgb(209 213 219);
}

.pl-10 { padding-left: 2.5rem; }

/* Hymns specific styling */
.hymns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.hymn-card {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  transition: box-shadow 0.15s ease-in-out;
  overflow: hidden;
}

.hymn-card:hover {
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.hymn-card-header {
  padding: 1rem;
  border-bottom: 1px solid rgb(229 231 235);
}

.hymn-number {
  display: inline-block;
  background: rgb(147 51 234);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.hymn-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: rgb(17 24 39);
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
}

.hymn-author {
  color: rgb(75 85 99);
  font-size: 0.875rem;
  margin: 0 0 0.25rem 0;
}

.hymn-details {
  color: rgb(107 114 128);
  font-size: 0.75rem;
  margin: 0 0 0.25rem 0;
}

.hymn-channel {
  color: rgb(107 114 128);
  font-size: 0.75rem;
  margin: 0;
}

.hymn-card-body {
  padding: 1rem;
}

.hymn-lyrics-preview {
  color: rgb(107 114 128);
  font-size: 0.875rem;
  line-height: 1.5;
}

.hymn-card-actions {
  padding: 1rem;
  border-top: 1px solid rgb(229 231 235);
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Hymn lyrics view styling */
.hymn-lyrics-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.hymn-lyrics-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem 1rem;
  border-bottom: 1px solid rgb(229 231 235);
  background: linear-gradient(135deg, rgb(147 51 234) 0%, rgb(126 34 206) 100%);
  border-radius: 0.75rem;
  color: white;
}

.hymn-lyrics-number {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  backdrop-filter: blur(10px);
}

.hymn-lyrics-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin: 0 0 1rem 0;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hymn-lyrics-author {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 0.5rem 0;
}

.hymn-lyrics-details {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 0.5rem 0;
}

.hymn-lyrics-channel {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

.hymn-lyrics-content {
  max-width: 600px;
  margin: 0 auto;
}

.hymn-verse {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: rgb(249 250 251);
  border-radius: 0.5rem;
  border-left: 4px solid rgb(147 51 234);
}

.hymn-verse-number {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgb(147 51 234);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hymn-verse-text p {
  margin: 0 0 0.5rem 0;
  line-height: 1.7;
  color: rgb(31 41 55);
}

.hymn-verse-text p:last-child {
  margin-bottom: 0;
}

/* Audio player styling */
.audio-player-active {
  padding-bottom: 65vh;
}

.audio-player-active.player-collapsed {
  padding-bottom: 80px;
}

/* Button group styling */
.btn-group {
  display: inline-flex;
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.btn-group .btn {
  border-radius: 0;
  border-right-width: 0;
}

.btn-group .btn:first-child {
  border-top-left-radius: 0.375rem;
  border-bottom-left-radius: 0.375rem;
}

.btn-group .btn:last-child {
  border-top-right-radius: 0.375rem;
  border-bottom-right-radius: 0.375rem;
  border-right-width: 1px;
}

/* Additional spacing utilities */
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }

/* Background color utilities */
.bg-purple-50 { background-color: rgb(250 245 255); }
.bg-purple-100 { background-color: rgb(243 232 255); }
.bg-green-50 { background-color: rgb(240 253 244); }
.bg-green-100 { background-color: rgb(220 252 231); }
.bg-orange-50 { background-color: rgb(255 247 237); }
.bg-orange-100 { background-color: rgb(254 215 170); }

/* Border color utilities */
.border-purple-200 { border-color: rgb(196 181 253); }

/* Hover background utilities */
.hover\:bg-purple-100:hover { background-color: rgb(243 232 255); }
.hover\:bg-green-100:hover { background-color: rgb(220 252 231); }
.hover\:bg-orange-100:hover { background-color: rgb(254 215 170); }

/* Additional responsive utilities */
@media (min-width: 640px) {
  .sm\:flex-row { flex-direction: row; }
}

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Additional utilities for home page */
.col-span-full { grid-column: 1 / -1; }

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Transform utilities setup */
* {
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
}
