/*
 * Twitch Overlay Final Theme — Responsive System v7.0
 * Loaded AFTER style.css on purpose. These rules are the final authority for
 * phones and tablets and protect the layout from legacy theme/plugin CSS.
 */

html, body {
  max-width: 100%;
  overflow-x: clip;
}
.site-main,
.todp-container,
.todp-final-shell,
.todp-final-carousel,
.todp-final-track,
.todp-final-slide,
.todp-service-swiper,
.todp-service-rail,
.todp-services-rich,
.todp-card,
.todp-hd-media,
.todp-v4-page-grid,
.todp-v4-split,
.todp-v4-contact,
.todp-v5-overview,
.todp-v5-two-col {
  min-width: 0;
  max-width: 100%;
}

.todp-final-media img,
.todp-hd-media img,
.todp-service-media img,
.todp-service-card-media img {
  image-rendering: auto;
}

/* Keep swipe strips inside the viewport even when plugins add global widths. */
.todp-final-thumbs,
.todp-service-rail {
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.todp-final-thumbs::-webkit-scrollbar,
.todp-service-rail::-webkit-scrollbar { display: none; }

@media (max-width: 860px) {
  :root { --todp-container: 100%; }

  body { font-size: 16px; }
  .todp-container { width: calc(100% - 28px) !important; margin-inline: auto !important; }
  .todp-section { padding: 64px 0 !important; }
  .todp-section-sm { padding: 48px 0 !important; }

  /* Compact, predictable mobile header. */
  .todp-site-header {
    position: sticky !important;
    top: 0;
    z-index: 9999 !important;
    width: 100%;
    background: rgba(3,5,16,.96) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }
  .todp-header-inner {
    min-height: 66px !important;
    width: calc(100% - 24px) !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
  }
  .todp-text-brand {
    display: block !important;
    flex: 1 1 auto !important;
    max-width: calc(100vw - 88px) !important;
    min-width: 0 !important;
    font-size: clamp(.78rem, 3.8vw, 1rem) !important;
    font-weight: 900 !important;
    letter-spacing: -.02em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .todp-text-brand span { display: block !important; }
  .todp-menu-toggle {
    display: inline-flex !important;
    flex: 0 0 48px !important;
    width: 48px !important;
    height: 46px !important;
    min-height: 46px !important;
    margin-left: auto !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 13px !important;
  }
  .todp-menu-toggle > span:last-child { display: none !important; }
  .todp-menu-toggle-lines { width: 24px !important; height: 17px !important; }

  .todp-primary-nav {
    position: absolute !important;
    left: 12px !important;
    right: 12px !important;
    top: calc(100% + 6px) !important;
    width: auto !important;
    padding: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-8px) !important;
    pointer-events: none !important;
    display: block !important;
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease !important;
  }
  .todp-primary-nav.is-open {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    pointer-events: auto !important;
  }
  .todp-primary-nav > div > ul,
  .todp-primary-nav > ul {
    display: block !important;
    max-height: calc(100svh - 92px) !important;
    overflow-y: auto !important;
    padding: 10px !important;
    margin: 0 !important;
    background: rgba(6,8,23,.99) !important;
    border: 1px solid rgba(154,95,255,.28) !important;
    border-radius: 16px !important;
    box-shadow: 0 22px 60px rgba(0,0,0,.55) !important;
  }
  .todp-primary-nav li { width: 100% !important; }
  .todp-primary-nav a {
    width: 100% !important;
    min-height: 46px !important;
    padding: 11px 13px !important;
    display: flex !important;
    align-items: center !important;
    border-radius: 10px !important;
  }
  .todp-primary-nav .sub-menu {
    position: static !important;
    display: none !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 2px 0 8px 10px !important;
    padding: 3px 0 3px 8px !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    border: 0 !important;
    border-left: 1px solid rgba(160,104,255,.30) !important;
    box-shadow: none !important;
    background: transparent !important;
  }
  .todp-primary-nav .menu-item-has-children.is-submenu-open > .sub-menu { display: block !important; }
  .todp-primary-nav .menu-cta > a { justify-content: center !important; margin-top: 5px !important; }

  /* HERO: full image is visible on mobile, never squeezed/cropped. */
  .todp-final-hero { padding: 0 0 42px !important; overflow: hidden !important; }
  .todp-final-shell { width: 100% !important; margin: 0 !important; }
  .todp-final-carousel {
    width: 100% !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-radius: 0 0 18px 18px !important;
    overflow: hidden !important;
    touch-action: pan-y !important;
  }

  /* Active slide participates in document flow, removing fragile fixed heights. */
  .todp-final-track { min-height: 0 !important; height: auto !important; }
  .todp-final-slide {
    position: relative !important;
    inset: auto !important;
    display: none !important;
    width: 100% !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    pointer-events: auto !important;
  }
  .todp-final-slide.is-active { display: flex !important; }
  .todp-final-media {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 16 / 9 !important;
    overflow: hidden !important;
    background: #02030b !important;
  }
  .todp-final-media img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
  }
  .todp-final-media::after { height: 38px !important; }
  .todp-final-swipe-hint {
    display: inline-flex !important;
    right: 10px !important;
    bottom: 10px !important;
    padding: 6px 9px !important;
    font-size: .59rem !important;
  }
  .todp-final-caption {
    display: block !important;
    width: 100% !important;
    padding: 22px 18px 18px !important;
    background: linear-gradient(180deg,rgba(9,12,31,.99),rgba(5,7,20,1)) !important;
  }
  .todp-final-copy { width: 100% !important; max-width: none !important; }
  .todp-final-copy .todp-v5-kicker { margin: 0 0 8px !important; font-size: .67rem !important; }
  .todp-final-copy h1 {
    margin: 0 0 10px !important;
    font-size: clamp(1.85rem, 8.5vw, 2.75rem) !important;
    line-height: 1.02 !important;
    overflow-wrap: anywhere !important;
  }
  .todp-final-copy > p:last-child {
    margin: 0 !important;
    max-width: none !important;
    font-size: .94rem !important;
    line-height: 1.55 !important;
  }
  .todp-final-actions { width: 100% !important; align-items: stretch !important; margin-top: 18px !important; }
  .todp-final-actions .todp-btn-row {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    margin: 0 !important;
  }
  .todp-final-actions .todp-btn { width: 100% !important; min-width: 0 !important; padding-inline: 10px !important; font-size: .82rem !important; }
  .todp-final-actions .todp-v5-trust { display: none !important; }
  .todp-final-carousel > .todp-carousel-arrow {
    top: clamp(72px, 24vw, 185px) !important;
    bottom: auto !important;
    width: 42px !important;
    height: 42px !important;
    border-radius: 12px !important;
    font-size: 1.75rem !important;
    background: rgba(3,5,18,.82) !important;
  }
  .todp-final-carousel > .todp-carousel-arrow.prev { left: 8px !important; }
  .todp-final-carousel > .todp-carousel-arrow.next { right: 8px !important; }
  .todp-final-controls {
    width: 100% !important;
    padding: 11px 12px 5px !important;
    gap: 10px !important;
  }
  .todp-final-controls .todp-carousel-dots {
    position: static !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    max-width: calc(100% - 50px) !important;
    overflow-x: auto !important;
    padding: 4px 0 !important;
  }
  .todp-final-controls .todp-carousel-dots button { flex: 0 0 auto !important; }
  .todp-final-thumbs {
    display: flex !important;
    width: 100% !important;
    gap: 8px !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    touch-action: pan-x !important;
    padding: 10px 12px 14px !important;
  }
  .todp-final-thumbs button {
    flex: 0 0 min(42vw, 164px) !important;
    width: min(42vw, 164px) !important;
    min-width: 0 !important;
    scroll-snap-align: center !important;
    border-radius: 12px !important;
  }
  .todp-final-thumbs img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16/9 !important;
    object-fit: cover !important;
  }
  .todp-final-thumbs span { padding: 8px 9px !important; font-size: .62rem !important; }

  /* Homepage service carousel: exactly one readable card per phone viewport. */
  .todp-v5-services-section { padding-top: 54px !important; }
  .todp-service-swiper { width: 100% !important; overflow: hidden !important; }
  .todp-service-rail {
    display: flex !important;
    grid-template-columns: none !important;
    width: 100% !important;
    gap: 14px !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    touch-action: pan-x !important;
    overscroll-behavior-inline: contain !important;
    padding: 4px 0 16px !important;
    cursor: auto !important;
  }
  .todp-service-swipe-card {
    display: block !important;
    flex: 0 0 calc(100vw - 42px) !important;
    width: calc(100vw - 42px) !important;
    max-width: calc(100vw - 42px) !important;
    min-width: 0 !important;
    scroll-snap-align: center !important;
    border-radius: 18px !important;
    overflow: hidden !important;
  }
  .todp-service-card-media {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16/9 !important;
  }
  .todp-service-card-media img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
  .todp-service-card-copy { padding: 20px !important; }
  .todp-service-card-copy h3 { font-size: 1.32rem !important; overflow-wrap: anywhere !important; }
  .todp-service-card-copy p { font-size: .92rem !important; }
  .todp-service-arrow { display: none !important; }

  /* SERVICES PAGE: never render as skinny desktop columns on phones. */
  .todp-services-rich {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    gap: 18px !important;
  }
  .todp-service-rich {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    border-radius: 18px !important;
  }
  .todp-service-media {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    overflow: hidden !important;
  }
  .todp-service-media img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: cover !important;
  }
  .todp-service-body { width: 100% !important; padding: 20px !important; min-width: 0 !important; }
  .todp-service-body h3 { font-size: 1.35rem !important; overflow-wrap: anywhere !important; }
  .todp-service-body p { font-size: .93rem !important; overflow-wrap: anywhere !important; }

  /* Inner page grids and image blocks. */
  .todp-v4-page-grid,
  .todp-v4-split,
  .todp-v4-split.reverse,
  .todp-v4-contact,
  .todp-v5-overview,
  .todp-v5-two-col,
  .todp-v5-two-col.reverse,
  .todp-service-page-grid,
  .todp-contact-layout,
  .todp-order-grid,
  .todp-faq-grid,
  .todp-service-overview,
  .todp-deliverable-grid,
  .todp-feature-list-v3,
  .todp-service-process-v3,
  .todp-v4-gallery,
  .todp-v4-mini-grid,
  .todp-grid-4,
  .todp-grid-3,
  .todp-grid-2,
  .todp-post-grid,
  .todp-form-grid,
  .todp-footer-main {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) !important;
    width: 100% !important;
  }
  .todp-v4-split.reverse > .todp-hd-media,
  .todp-v5-two-col.reverse > .todp-hd-media { order: 0 !important; }
  .todp-v4-contact .todp-hd-media { position: relative !important; top: auto !important; }
  .todp-v4-page-hero { padding: 44px 0 30px !important; }
  .todp-v4-page-grid h1,
  .todp-page-hero-v3 h1,
  .todp-service-page-grid h1 {
    font-size: clamp(2.15rem, 9.5vw, 3rem) !important;
    overflow-wrap: anywhere !important;
  }
  .todp-hd-media,
  .todp-service-page-media,
  .todp-about-visual,
  .todp-order-visual,
  .todp-split-media {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    border-radius: 16px !important;
  }
  .todp-hd-media img,
  .todp-v4-page-grid .todp-hd-media img,
  .todp-v4-split .todp-hd-media img,
  .todp-v4-contact .todp-hd-media img,
  .todp-service-page-media img,
  .todp-about-visual img,
  .todp-order-visual img,
  .todp-split-media img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    object-fit: contain !important;
    object-position: center !important;
    background: #040611 !important;
  }
  .todp-v4-proof,
  .todp-proof-strip { grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important; }
  .todp-package-card-v3.featured { transform: none !important; }
  .todp-v4-form-card,
  .todp-contact-card,
  .todp-order-form-card,
  .todp-card { min-width: 0 !important; }
  .todp-v4-cta,
  .todp-v5-order-cta { display: block !important; padding: 26px 20px !important; }
  .todp-v4-cta .todp-btn-row,
  .todp-v5-order-cta .todp-btn-row { justify-content: flex-start !important; margin-top: 20px !important; }

  .todp-whatsapp-float {
    right: 14px !important;
    bottom: 14px !important;
    width: 54px !important;
    height: 54px !important;
    border-radius: 17px !important;
    border-width: 3px !important;
  }
  .todp-whatsapp-float::before { display: none !important; }
}

@media (max-width: 520px) {
  .todp-container { width: calc(100% - 22px) !important; }
  .todp-section { padding: 54px 0 !important; }
  .todp-header-inner { width: calc(100% - 20px) !important; min-height: 62px !important; }
  .todp-menu-toggle { width: 44px !important; height: 42px !important; min-height: 42px !important; flex-basis: 44px !important; }
  .todp-text-brand { max-width: calc(100vw - 76px) !important; font-size: .82rem !important; }

  .todp-final-caption { padding: 18px 14px 16px !important; }
  .todp-final-copy h1 { font-size: clamp(1.72rem, 8.8vw, 2.25rem) !important; }
  .todp-final-copy > p:last-child { font-size: .9rem !important; }
  .todp-final-actions .todp-btn-row { grid-template-columns: 1fr !important; }
  .todp-final-actions .todp-btn { min-height: 46px !important; }
  .todp-final-carousel > .todp-carousel-arrow {
    top: clamp(55px, 22vw, 105px) !important;
    width: 38px !important;
    height: 38px !important;
    font-size: 1.55rem !important;
  }
  .todp-final-thumbs button { flex-basis: min(44vw, 146px) !important; width: min(44vw,146px) !important; }
  .todp-final-thumbs span { font-size: .59rem !important; }
  .todp-service-swipe-card {
    flex-basis: calc(100vw - 30px) !important;
    width: calc(100vw - 30px) !important;
    max-width: calc(100vw - 30px) !important;
  }
  .todp-service-card-copy,
  .todp-service-body { padding: 18px !important; }
  .todp-v4-proof,
  .todp-proof-strip { grid-template-columns: minmax(0,1fr) !important; }
  .todp-btn-row { gap: 10px !important; }
  .todp-btn-row .todp-btn { max-width: 100% !important; }
}

@media (max-width: 360px) {
  .todp-text-brand { font-size: .72rem !important; }
  .todp-final-copy h1 { font-size: 1.65rem !important; }
  .todp-final-copy > p:last-child { font-size: .86rem !important; }
  .todp-final-thumbs button { flex-basis: 46vw !important; width: 46vw !important; }
  .todp-service-swipe-card { flex-basis: calc(100vw - 24px) !important; width: calc(100vw - 24px) !important; max-width: calc(100vw - 24px) !important; }
}

@supports not (overflow: clip) {
  html, body { overflow-x: hidden; }
}
