/**
 * Azure Stream Theme - Utility Classes
 * Custom utilities for Azure Stream theme
 */

/* ===========================
   Text Utilities
   =========================== */

/* Line clamp for text truncation */
.azure-line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

/* Gradient text */
.azure-gradient-text {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===========================
   Layout Utilities
   =========================== */

/* Container with azure max-width */
.azure-container {
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* Aspect ratios */
.azure-aspect-video {
  aspect-ratio: 16 / 9;
}

.azure-aspect-square {
  aspect-ratio: 1 / 1;
}

.azure-aspect-portrait {
  aspect-ratio: 3 / 4;
}

/* ===========================
   Scrollbar Styling
   =========================== */

.azure-scrollbar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.azure-scrollbar::-webkit-scrollbar-track {
  background: #1a1f26;
  border-radius: 4px;
}

.azure-scrollbar::-webkit-scrollbar-thumb {
  background: #374151;
  border-radius: 4px;
}

.azure-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #4b5563;
}

/* Firefox scrollbar */
.azure-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: #374151 #1a1f26;
}

/* ===========================
   Gradient Utilities
   =========================== */

.azure-gradient-bg {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.azure-gradient-border {
  position: relative;
}

.azure-gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ===========================
   Focus Styles
   =========================== */

.azure-focus:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.azure-focus-ring:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* ===========================
   Backdrop Blur
   =========================== */

.azure-blur {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.azure-blur-lg {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ===========================
   Shadow Utilities
   =========================== */

.azure-shadow-sm {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.azure-shadow-md {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.azure-shadow-lg {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.azure-shadow-xl {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

/* Glow shadow for primary color */
.azure-shadow-glow {
  box-shadow: 0 0 24px rgba(59, 130, 246, 0.3);
}

/* ===========================
   Grid Utilities
   =========================== */

/* Responsive grid for video cards */
.azure-video-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
  .azure-video-grid {
    gap: 14px;
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .azure-video-grid {
    gap: 16px;
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1536px) {
  .azure-video-grid {
    gap: 20px;
  }
}

/* ===========================
   Badge Utilities
   =========================== */

.azure-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  white-space: nowrap;
}

.azure-badge-primary {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  color: white;
}

.azure-badge-secondary {
  background: #232a33;
  color: #94a3b8;
}

.azure-badge-outline {
  border: 1px solid #374151;
  background: transparent;
  color: #f1f5f9;
}

/* ===========================
   Overlay Utilities
   =========================== */

.azure-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 25, 0.6);
  transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.azure-overlay-hover:hover .azure-overlay {
  background: rgba(15, 20, 25, 0.3);
}

/* ===========================
   Visibility Utilities
   =========================== */

/* Hide on mobile, show on desktop */
.azure-hide-mobile {
  display: none;
}

@media (min-width: 1024px) {
  .azure-hide-mobile {
    display: block;
  }
}

/* Show on mobile, hide on desktop */
.azure-show-mobile {
  display: block;
}

@media (min-width: 1024px) {
  .azure-show-mobile {
    display: none;
  }
}

/* ===========================
   Transition Utilities
   =========================== */

.azure-transition {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.azure-transition-fast {
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.azure-transition-slow {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===========================
   Z-Index Utilities
   =========================== */

.azure-z-dropdown {
  z-index: 50;
}

.azure-z-sidebar {
  z-index: 40;
}

.azure-z-header {
  z-index: 30;
}

.azure-z-modal {
  z-index: 60;
}

.azure-z-overlay {
  z-index: 35;
}
