/* Hero Section Responsive Content - Force proper mobile/desktop separation */
/* This file is loaded after Tailwind to ensure proper override */
section.bg-slate-50 .hero-mobile-heading,
section.bg-slate-50 .hero-mobile-description {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

section.bg-slate-50 .hero-desktop-heading,
section.bg-slate-50 .hero-desktop-description {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

@media (min-width: 768px) {
  section.bg-slate-50 .hero-mobile-heading,
  section.bg-slate-50 .hero-mobile-description {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  section.bg-slate-50 .hero-desktop-heading,
  section.bg-slate-50 .hero-desktop-description {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
  }
}

/* Expand legacy max-width containers to use the full viewport width with soft padding */
:root :where(.max-w-6xl, .max-w-7xl, .wide-container) {
  max-width: min(100%, 1440px);
  width: 100%;
  padding-left: clamp(0.75rem, 3vw, 2.5rem);
  padding-right: clamp(0.75rem, 3vw, 2.5rem);
  box-sizing: border-box;
}

@media (min-width: 1280px) {
  :root :where(.max-w-6xl, .max-w-7xl, .wide-container) {
    max-width: min(100%, 1600px);
    padding-left: clamp(1.5rem, 4vw, 3.5rem);
    padding-right: clamp(1.5rem, 4vw, 3.5rem);
  }
}

/* Competition show responsive rows */
.mobile-scroll-row {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x proximity;
}

.mobile-scroll-row::-webkit-scrollbar {
  display: none;
}

.mobile-scroll-item {
  flex: 0 0 auto;
  min-width: 170px;
  scroll-snap-align: start;
}

.mobile-scroll-item--auto {
  min-width: auto;
}

@media (min-width: 640px) {
  .mobile-scroll-row {
    overflow: visible;
    padding-bottom: 0;
    gap: 1rem;
    scroll-snap-type: none;
  }

  .mobile-scroll-row .mobile-scroll-item {
    flex: 1 1 auto;
    min-width: 0;
  }

  .mobile-scroll-row.mobile-scroll--stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-scroll-row.mobile-scroll--prizes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mobile-scroll-row.mobile-scroll--dates {
    display: flex;
    justify-content: space-between;
  }

  .mobile-scroll-row.mobile-scroll--winners {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  }
}

/* Competition content shell */
.competition-shell,
.topup-shell {
  width: 100%;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1024px) {
  .competition-shell,
  .topup-shell {
    max-width: 1180px;
    padding-left: clamp(1.5rem, 3vw, 3rem);
    padding-right: clamp(1.5rem, 3vw, 3rem);
  }
}

@media (min-width: 1440px) {
  .competition-shell,
  .topup-shell {
    max-width: 1400px;
  }
}

/* Etoskills admin pagination styling */
.etoskills-pagination {
  display: inline-flex;
  align-items: center;
}

.etoskills-pagination nav.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.etoskills-pagination nav.pagination a,
.etoskills-pagination nav.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  border-radius: 9999px;
  padding: 0.35rem 0.85rem;
  font-weight: 600;
  font-size: 0.75rem;
  text-decoration: none;
  border: 1px solid rgba(79, 70, 229, 0.15);
  color: #4F46E5;
  background: rgba(79, 70, 229, 0.08);
  transition: all 0.2s ease;
  box-shadow: 0 12px 30px -22px rgba(79, 70, 229, 0.6);
}

.etoskills-pagination nav.pagination a:hover {
  color: #ffffff;
  border-color: transparent;
  background-image: linear-gradient(135deg, #4F46E5 0%, #22D3EE 50%, #6366F1 100%);
  box-shadow: 0 14px 38px -20px rgba(79, 70, 229, 0.65);
}

.etoskills-pagination nav.pagination .current {
  color: #ffffff;
  border-color: transparent;
  background-image: linear-gradient(135deg, #4F46E5 0%, #22D3EE 50%, #6366F1 100%);
  box-shadow: 0 16px 40px -18px rgba(79, 70, 229, 0.7);
}

.etoskills-pagination nav.pagination .disabled {
  opacity: 0.45;
  cursor: not-allowed;
  color: #94A3B8;
  border-color: rgba(148, 163, 184, 0.25);
  background: rgba(148, 163, 184, 0.08);
  box-shadow: none;
}

.etoskills-pagination nav.pagination .gap {
  min-width: 1rem;
  border: none;
  background: transparent;
  color: #94A3B8;
  box-shadow: none;
  padding: 0.35rem 0.25rem;
}
/* Trix Editor Custom Styling */
trix-editor {
  min-height: 200px;
  padding: 1rem;
  border: 1px solid #CBD5F0;
  border-radius: 1rem;
  background: white;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #1A2142;
}

trix-editor:focus {
  outline: none;
  border-color: #4F46E5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

trix-toolbar {
  border: 1px solid #CBD5F0;
  border-radius: 0.75rem 0.75rem 0 0;
  background: #F6F7FB;
  padding: 0.5rem;
  margin-bottom: -1px;
}

trix-toolbar .trix-button-group {
  margin: 0;
  border: none;
  border-radius: 0.5rem;
  background: white;
  padding: 0.25rem;
}

trix-toolbar .trix-button {
  border: none;
  border-radius: 0.375rem;
  padding: 0.375rem 0.5rem;
  margin: 0 0.125rem;
  color: #64748B;
  background: transparent;
}

trix-toolbar .trix-button:hover {
  background: #EEF2FF;
  color: #4F46E5;
}

trix-toolbar .trix-button.trix-active {
  background: #EEF2FF;
  color: #4F46E5;
}

trix-toolbar .trix-button-group-spacer {
  border-left: 1px solid #E2E8F0;
  margin: 0 0.5rem;
}

trix-toolbar .trix-dialog {
  border: 1px solid #CBD5F0;
  border-radius: 0.5rem;
  background: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

trix-toolbar .trix-dialog__link-fields {
  padding: 0.75rem;
}

trix-toolbar .trix-input {
  border: 1px solid #CBD5F0;
  border-radius: 0.375rem;
  padding: 0.5rem;
  font-size: 0.875rem;
}

trix-toolbar .trix-input:focus {
  outline: none;
  border-color: #4F46E5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

trix-editor h1, trix-editor h2, trix-editor h3 {
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: #1A2142;
}

trix-editor p {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

trix-editor ul, trix-editor ol {
  margin-left: 1.5rem;
  margin-bottom: 0.75rem;
}

trix-editor blockquote {
  border-left: 3px solid #4F46E5;
  padding-left: 1rem;
  margin: 1rem 0;
  color: #64748B;
  font-style: italic;
}

trix-editor code {
  background: #F1F5FF;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  color: #4F46E5;
}

trix-editor pre {
  background: #F1F5FF;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1rem 0;
}

trix-editor a {
  color: #4F46E5;
  text-decoration: underline;
}

trix-editor a:hover {
  color: #3e3bc2;
}

trix-editor img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1rem 0;
}

/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

/* Google AdSense Manual Ad Units - Match Container Width */
.adsbygoogle,
ins.adsbygoogle {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: min(100%, 100vw) !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  contain: content !important;
}

/* Ad container wrapper - match parent container width */
div[data-adsense-slot],
div.google-ad-container,
div.my-8.flex.justify-center {
  width: 100% !important;
  min-width: 320px !important;
  max-width: min(100%, 100vw) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  display: flex !important;
  justify-content: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  contain: content !important;
}

/* Match container max-width constraints */
main.container div[data-adsense-slot],
main.container div.google-ad-container,
main.container div.my-8.flex.justify-center,
.container div[data-adsense-slot],
.container div.google-ad-container,
.container div.my-8.flex.justify-center {
  max-width: 100% !important;
}

/* Match max-w-6xl container */
.max-w-6xl div[data-adsense-slot],
.max-w-6xl div.google-ad-container,
.max-w-6xl div.my-8.flex.justify-center {
  max-width: 100% !important;
}

/* Match max-w-7xl container */
.max-w-7xl div[data-adsense-slot],
.max-w-7xl div.google-ad-container,
.max-w-7xl div.my-8.flex.justify-center {
  max-width: 100% !important;
}

/* Match wide-container */
.wide-container div[data-adsense-slot],
.wide-container div.google-ad-container,
.wide-container div.my-8.flex.justify-center {
  max-width: 100% !important;
}

/* Mobile responsive - ensure ads don't overflow but respect container */
@media (max-width: 640px) {
  .adsbygoogle,
  ins.adsbygoogle,
  div[data-adsense-slot],
  div.google-ad-container,
  div.my-8.flex.justify-center {
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: hidden !important;
    contain: content !important;
  }
}

/* Google AdSense aswift containers - make responsive */
div[id^="aswift_"] {
  width: 100% !important;
  max-width: min(100%, 100vw) !important;
  height: auto !important;
  min-height: 0 !important;
  position: relative !important;
  display: block !important;
  margin: 0 auto !important;
  padding: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  contain: layout style paint !important;
  /* Clip any content that overflows */
  clip-path: inset(0) !important;
}

/* Ensure aswift host containers match their iframe height and are responsive */
div[id^="aswift_"][id$="_host"] {
  width: 100% !important;
  max-width: min(100%, 100vw) !important;
  height: auto !important;
  min-height: 0 !important;
  position: relative !important;
  display: block !important;
  margin: 0 auto !important;
  padding: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  contain: layout style paint !important;
  /* For 1200x280 ads, maintain aspect ratio but respect container width */
  aspect-ratio: 1200 / 280 !important;
  /* Clip any content that overflows */
  clip-path: inset(0) !important;
}

/* Ad iframes responsive */
ins.adsbygoogle + iframe,
iframe[src*="googlesyndication"],
iframe[src*="doubleclick"],
iframe[src*="googleadservices"] {
  display: block !important;
  width: 100% !important;
  max-width: min(100%, 100vw) !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  position: relative !important;
  /* Ensure iframe content is clipped */
  clip-path: inset(0) !important;
  contain: layout style paint !important;
}

/* aswift iframes - handle absolute positioning */
iframe[id^="aswift_"] {
  width: 100% !important;
  max-width: min(100%, 100vw) !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  /* Keep absolute positioning but make responsive */
  left: 0 !important;
  top: 0 !important;
  /* Ensure iframe content is clipped */
  clip-path: inset(0) !important;
  contain: layout style paint !important;
}

/* Mobile iframe responsiveness */
@media (max-width: 640px) {
  div[id^="aswift_"] {
    width: 100% !important;
    max-width: 100vw !important;
    height: auto !important;
    overflow: hidden !important;
    contain: layout style paint !important;
    clip-path: inset(0) !important;
  }
  
  div[id^="aswift_"][id$="_host"] {
    width: 100% !important;
    max-width: 100vw !important;
    height: auto !important;
    aspect-ratio: 1200 / 280 !important;
    overflow: hidden !important;
    contain: layout style paint !important;
    clip-path: inset(0) !important;
  }
  
  ins.adsbygoogle + iframe,
  iframe[src*="googlesyndication"],
  iframe[src*="doubleclick"],
  iframe[src*="googleadservices"] {
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    height: auto !important;
    overflow: hidden !important;
    clip-path: inset(0) !important;
    contain: layout style paint !important;
  }
  
  iframe[id^="aswift_"] {
    width: 100% !important;
    max-width: 100vw !important;
    height: 100% !important;
    overflow: hidden !important;
    clip-path: inset(0) !important;
    contain: layout style paint !important;
  }
}

/* Tablet responsiveness */
@media (min-width: 641px) and (max-width: 1024px) {
  .adsbygoogle,
  div[data-adsense-slot],
  div.google-ad-container,
  div.my-8.flex.justify-center {
    max-width: min(100%, 100vw) !important;
  }
  
  div[id^="aswift_"] {
    width: 100% !important;
    max-width: min(100%, 100vw) !important;
    height: auto !important;
  }
  
  div[id^="aswift_"][id$="_host"] {
    width: 100% !important;
    max-width: min(100%, 100vw) !important;
    height: auto !important;
    aspect-ratio: 1200 / 280 !important;
    overflow: hidden !important;
    contain: layout style paint !important;
    clip-path: inset(0) !important;
  }
  
  iframe[id^="aswift_"] {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    clip-path: inset(0) !important;
    contain: layout style paint !important;
  }
}

/* Desktop - maintain aspect ratio for 1200x280 ads */
@media (min-width: 1025px) {
  div[id^="aswift_"] {
    width: 100% !important;
    max-width: min(1200px, 100%) !important;
    height: auto !important;
  }
  
  div[id^="aswift_"][id$="_host"] {
    width: 100% !important;
    max-width: min(1200px, 100%) !important;
    height: auto !important;
    aspect-ratio: 1200 / 280 !important;
    overflow: hidden !important;
    contain: layout style paint !important;
    clip-path: inset(0) !important;
  }
  
  /* Iframe fills the host container */
  iframe[id^="aswift_"] {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    clip-path: inset(0) !important;
    contain: layout style paint !important;
  }
}

/* Responsive aspect ratio for 1200x280 format */
@media (max-width: 1200px) {
  iframe[id^="aswift_"][width="1200"][height="280"] {
    aspect-ratio: 1200 / 280 !important;
  }
}

/* Hide ads after footer */
footer ~ div[data-adsense-slot],
footer ~ ins.adsbygoogle,
footer ~ iframe[src*="googlesyndication"],
footer ~ iframe[src*="doubleclick"],
footer ~ iframe[src*="googleadservices"] {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Prevent all ad elements from causing horizontal overflow */
div[id^="aswift_"],
div[id^="aswift_"][id$="_host"],
iframe[id^="aswift_"],
iframe[src*="googlesyndication"],
iframe[src*="doubleclick"],
iframe[src*="googleadservices"],
ins.adsbygoogle,
div[data-adsense-slot],
div.google-ad-container,
div.my-8.flex.justify-center {
  max-width: min(100%, 100vw) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  contain: layout style paint !important;
  /* Clip any overflowing content */
  clip-path: inset(0) !important;
}

/* Remove height from ins tags */
ins,
ins.adsbygoogle {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}

