/* ===================================================== */
/* ============= INDEX MOBILE RESCUE PATCH ============= */
/* ===================================================== */

/* Safe patch: mobile only, desktop untouched */
.mobile-access-stack {
  display: none;
}

.mobile-plan-tabs,
.mobile-plan-summary,
.mobile-faq-accordion {
  display: none;
}

@media (max-width: 1024px) {
  .chatbot-fab {
    right: 14px !important;
    bottom: max(16px, calc(env(safe-area-inset-bottom) + 8px)) !important;
    width: 56px !important;
    height: 56px !important;
    z-index: 10006 !important;
  }

  .chatbot-window {
    right: 14px !important;
    left: auto !important;
    top: auto !important;
    bottom: max(84px, calc(env(safe-area-inset-bottom) + 72px)) !important;
    width: min(420px, calc(100vw - 28px)) !important;
    height: min(66vh, 620px) !important;
    max-height: min(66vh, 620px) !important;
    border-radius: 16px !important;
    z-index: 10006 !important;
  }
}

@media (max-width: 1100px), (max-width: 1280px) and (max-height: 900px) {
  body.chatbot-open {
    overflow: hidden !important;
    touch-action: none;
  }

  /* Header #main-header : site-shared-responsive.css */

  /* Same cards as phone, stacked */
  .welcome-cards-sides {
    display: none !important;
  }

  .welcome-cards-sides .card-left,
  .welcome-cards-sides .card-right {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    z-index: 1 !important;
    padding: 16px 14px !important;
    border-radius: 16px !important;
  }

  .card-left .card-title,
  .card-title-right {
    font-size: 21px !important;
    margin-bottom: 10px !important;
    line-height: 1.25;
  }

  .card-desc,
  .card-list a {
    font-size: 14px !important;
    line-height: 1.45 !important;
  }

  .main-section {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .mobile-access-stack {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    margin: 14px 0 10px;
  }

  .mobile-access-card {
    display: block;
    text-decoration: none;
    border-radius: 14px;
    border: 1px solid rgba(24, 231, 255, 0.28);
    background: linear-gradient(135deg, rgba(24,231,255,0.08), rgba(145,71,255,0.13));
    padding: 11px 12px;
    color: #e8eaff;
  }

  .mobile-access-card.safety {
    border-color: rgba(255, 72, 125, 0.35);
    background: linear-gradient(135deg, rgba(255,72,125,0.07), rgba(145,71,255,0.13));
  }

  .mobile-access-card strong {
    display: block;
    font-size: 15px;
    color: #fff;
    margin-bottom: 4px;
  }

  .mobile-access-card span {
    display: block;
    font-size: 13px;
    line-height: 1.35;
  }

  .mobile-extra-chip {
    border-radius: 12px;
    border: 1px dashed rgba(24,231,255,0.35);
    padding: 9px 10px;
    font-size: 12px;
    line-height: 1.35;
    color: #cfe8ff;
    text-align: center;
  }

  .main-title {
    font-size: clamp(28px, 7vw, 42px) !important;
    line-height: 1.15 !important;
  }

  .main-strap {
    font-size: clamp(16px, 3.6vw, 20px) !important;
    line-height: 1.4 !important;
  }

  .features-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .features-grid.features-wide {
    margin: 1.4rem auto 1.8rem !important;
    padding: 0 8px !important;
    gap: 10px !important;
  }

  .features-grid.features-wide > div {
    gap: 10px !important;
    padding: 8px 2px !important;
    min-height: 0 !important;
    align-items: flex-start !important;
  }

  .features-grid .feature-ico {
    width: clamp(2.5rem, 6vw + 1.5rem, 3.5rem) !important;
    height: clamp(2.5rem, 6vw + 1.5rem, 3.5rem) !important;
    min-width: clamp(2.4rem, 5vw + 1rem, 3.25rem) !important;
    margin-top: 2px !important;
  }

  .features-grid .feature-title {
    font-size: 22px !important;
  }

  .offers-twitch-cta {
    position: static !important;
    display: inline-flex !important;
    margin: 12px 10px 14px !important;
    font-size: 15px !important;
    z-index: 2 !important;
  }

  /* ===== Pricing / Offers readability on mobile ===== */
  .pricing-wide,
  .commit-wide-cols {
    margin-top: 1.4rem !important;
  }

  .pricing-glass {
    padding: 14px 10px 12px !important;
    border-radius: 16px !important;
  }

  .pricing-title-main {
    font-size: clamp(28px, 7vw, 38px) !important;
    margin-bottom: 10px !important;
    line-height: 1.12 !important;
  }

  .pricing-table-flex,
  .pricing-table-flex.commit {
    overflow-x: hidden !important;
    overflow-y: visible !important;
    justify-content: center !important;
    padding-bottom: 6px;
  }

  /* remove desktop decorative bubble on touch screens */
  .premium-col-bulle,
  .premium-col-bulle.premium-commit {
    display: none !important;
  }

  .pricing-grid-glass,
  .commit-grid-2 {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
  }

  .pricing-grid-glass th,
  .pricing-grid-glass td,
  .commit-grid-2 th,
  .commit-grid-2 td {
    font-size: 14px !important;
    line-height: 1.35 !important;
    padding: 8px 8px !important;
    white-space: normal !important;
    word-break: normal !important;
  }

  .pricing-grid-glass thead,
  .commit-grid-2 thead {
    display: none !important;
  }

  .pricing-grid-glass .row-label,
  .commit-grid-2 .row-label {
    min-width: 0 !important;
    width: 58% !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
  }

  .pricing-choose-btn,
  .price-choice {
    font-size: 14px !important;
    line-height: 1.3 !important;
  }

  .pricing-clarification {
    font-size: 12px !important;
    line-height: 1.42 !important;
    padding: 8px 10px !important;
  }

  .commit-wide-cols {
    margin-bottom: 20px !important;
  }

  .faq-row-minimal {
    margin-top: 16px !important;
    gap: 10px !important;
    padding: 0 10px !important;
    clear: both;
    position: relative;
    z-index: 1;
  }

  .faq-item-minimal {
    padding: 10px !important;
    border-radius: 12px !important;
  }

  .faq-answer-minimal,
  .faq-question-minimal {
    font-size: 13px !important;
    line-height: 1.35 !important;
  }

  footer {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px 12px !important;
    justify-content: center !important;
    padding: 8px 10px 10px !important;
    border-top: 1px solid rgba(24, 231, 255, 0.35) !important;
    background: linear-gradient(180deg, rgba(60, 27, 122, 0.98), rgba(50, 22, 108, 0.98)) !important;
    box-shadow: 0 -4px 18px rgba(24, 231, 255, 0.16) !important;
  }

  .bot-status-block {
    width: 100%;
    justify-content: center;
    margin-right: 0 !important;
  }

  .stats {
    width: 100%;
    gap: 10px !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
  }

  .stats-block {
    gap: 6px !important;
  }

  .stats-label {
    font-size: 11px !important;
    white-space: normal !important;
    text-align: center;
  }

  .copy-pro {
    width: 100%;
    margin-left: 0 !important;
    justify-content: center !important;
    flex-wrap: wrap;
    font-size: 11px !important;
    opacity: 0.96;
  }

  /* ===== Mobile plan tabs (no horizontal scroll) ===== */
  .mobile-plan-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    max-width: 640px;
    margin: 0 0 10px;
  }

  .mobile-plan-summary {
    width: 100%;
    margin: 0 0 8px;
    text-align: left;
    border-radius: 12px;
    border: 1px solid rgba(24, 231, 255, 0.26);
    background: rgba(10, 18, 52, 0.36);
    padding: 9px 10px 8px;
  }

  .mps-title {
    font-size: 18px;
    font-weight: 900;
    color: #18e7ff;
    line-height: 1.15;
  }

  .mps-price {
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    line-height: 1.05;
    margin-top: 3px;
  }

  .mps-sub {
    font-size: 13px;
    line-height: 1.35;
    color: #d6ddff;
    margin-top: 4px;
  }

  .mobile-plan-tabs .mpt-btn {
    border: 1px solid rgba(24, 231, 255, 0.35);
    background: rgba(255, 255, 255, 0.04);
    color: #dbe6ff;
    font-weight: 800;
    font-size: 12px;
    line-height: 1.2;
    border-radius: 10px;
    padding: 8px 6px;
    cursor: pointer;
  }

  .mobile-plan-tabs .mpt-btn.active {
    color: #0b1230;
    background: linear-gradient(135deg, #18e7ff, #7a2bff);
    border-color: transparent;
  }

  .pricing-table-flex[data-mobile-plan] .pricing-grid-glass th:nth-child(n+2),
  .pricing-table-flex[data-mobile-plan] .pricing-grid-glass td:nth-child(n+2),
  .pricing-table-flex.commit[data-mobile-plan] .commit-grid-2 th:nth-child(n+2),
  .pricing-table-flex.commit[data-mobile-plan] .commit-grid-2 td:nth-child(n+2) {
    display: none !important;
  }

  .pricing-table-flex[data-mobile-plan="1"] .pricing-grid-glass th:nth-child(2),
  .pricing-table-flex[data-mobile-plan="1"] .pricing-grid-glass td:nth-child(2),
  .pricing-table-flex[data-mobile-plan="2"] .pricing-grid-glass th:nth-child(3),
  .pricing-table-flex[data-mobile-plan="2"] .pricing-grid-glass td:nth-child(3),
  .pricing-table-flex[data-mobile-plan="3"] .pricing-grid-glass th:nth-child(4),
  .pricing-table-flex[data-mobile-plan="3"] .pricing-grid-glass td:nth-child(4),
  .pricing-table-flex[data-mobile-plan="4"] .pricing-grid-glass th:nth-child(5),
  .pricing-table-flex[data-mobile-plan="4"] .pricing-grid-glass td:nth-child(5),
  .pricing-table-flex.commit[data-mobile-plan="1"] .commit-grid-2 th:nth-child(2),
  .pricing-table-flex.commit[data-mobile-plan="1"] .commit-grid-2 td:nth-child(2),
  .pricing-table-flex.commit[data-mobile-plan="2"] .commit-grid-2 th:nth-child(3),
  .pricing-table-flex.commit[data-mobile-plan="2"] .commit-grid-2 td:nth-child(3),
  .pricing-table-flex.commit[data-mobile-plan="3"] .commit-grid-2 th:nth-child(4),
  .pricing-table-flex.commit[data-mobile-plan="3"] .commit-grid-2 td:nth-child(4),
  .pricing-table-flex.commit[data-mobile-plan="4"] .commit-grid-2 th:nth-child(5),
  .pricing-table-flex.commit[data-mobile-plan="4"] .commit-grid-2 td:nth-child(5) {
    display: table-cell !important;
  }

  .pricing-table-flex[data-mobile-plan] .pricing-grid-glass .row-label,
  .pricing-table-flex.commit[data-mobile-plan] .commit-grid-2 .row-label {
    width: 56% !important;
  }

  .pricing-table-flex[data-mobile-plan] .pricing-grid-glass td:nth-child(2),
  .pricing-table-flex[data-mobile-plan] .pricing-grid-glass td:nth-child(3),
  .pricing-table-flex[data-mobile-plan] .pricing-grid-glass td:nth-child(4),
  .pricing-table-flex[data-mobile-plan] .pricing-grid-glass td:nth-child(5),
  .pricing-table-flex.commit[data-mobile-plan] .commit-grid-2 td:nth-child(2),
  .pricing-table-flex.commit[data-mobile-plan] .commit-grid-2 td:nth-child(3),
  .pricing-table-flex.commit[data-mobile-plan] .commit-grid-2 td:nth-child(4),
  .pricing-table-flex.commit[data-mobile-plan] .commit-grid-2 td:nth-child(5) {
    width: 44% !important;
    text-align: right !important;
    padding-right: 10px !important;
  }

  .pricing-table-flex[data-mobile-plan] .price-choice,
  .pricing-table-flex.commit[data-mobile-plan] .price-choice {
    width: 100% !important;
    text-align: right !important;
  }

  .pricing-table-flex[data-mobile-plan] .price-choice .main,
  .pricing-table-flex[data-mobile-plan] .price-choice .sub,
  .pricing-table-flex.commit[data-mobile-plan] .price-choice .main,
  .pricing-table-flex.commit[data-mobile-plan] .price-choice .sub {
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  #offersTwitchCta {
    display: none !important;
  }

  .faq-row-minimal {
    display: none !important;
  }

  .mobile-faq-accordion {
    display: block !important;
    margin: 14px 10px 8px;
    border-radius: 14px;
    border: 1px solid rgba(24, 231, 255, 0.26);
    background: rgba(9, 14, 44, 0.35);
    padding: 10px;
  }

  .mobile-faq-accordion h3 {
    margin: 0 0 8px;
    font-size: 16px;
    color: #fff;
    font-weight: 800;
  }

  .mobile-faq-accordion details {
    border: 1px solid rgba(145, 71, 255, 0.24);
    border-radius: 10px;
    padding: 8px 10px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.02);
  }

  .mobile-faq-accordion details:last-child {
    margin-bottom: 0;
  }

  .mobile-faq-accordion summary {
    list-style: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    color: #18e7ff;
  }

  .mobile-faq-accordion summary::-webkit-details-marker {
    display: none;
  }

  .mobile-faq-accordion p {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.38;
    color: #dde3ff;
  }

  .chatbot-fab {
    bottom: max(102px, calc(env(safe-area-inset-bottom) + 90px)) !important;
    right: 12px !important;
    z-index: 10006 !important;
  }
}

@media (max-width: 600px) {
  .card-left .card-title,
  .card-title-right {
    font-size: 18px !important;
  }

  .card-desc,
  .card-list a {
    font-size: 13px !important;
  }

  /* Chatbot floating button/window were anchored too high */
  .chatbot-fab {
    right: 12px !important;
    bottom: max(106px, calc(env(safe-area-inset-bottom) + 94px)) !important;
    width: 52px !important;
    height: 52px !important;
    z-index: 10006 !important;
  }

  .chatbot-window {
    right: 8px !important;
    left: 8px !important;
    top: auto !important;
    bottom: max(170px, calc(env(safe-area-inset-bottom) + 150px)) !important;
    width: auto !important;
    height: min(62vh, 520px) !important;
    max-height: min(62vh, 520px) !important;
    border-radius: 16px !important;
    z-index: 10006 !important;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55) !important;
  }

  .chatbot-header {
    padding: 14px !important;
  }

  .chatbot-header h3 {
    font-size: 16px !important;
  }

  .chatbot-messages {
    padding: 12px !important;
    gap: 10px !important;
  }

  .chatbot-input-container {
    padding: 10px 12px !important;
    gap: 8px !important;
  }

  .pricing-title-main {
    font-size: clamp(24px, 8vw, 32px) !important;
  }

  .features-grid.features-wide > div {
    gap: 8px !important;
  }

  .features-grid .feature-ico {
    width: clamp(2.2rem, 7vw + 1rem, 3rem) !important;
    height: clamp(2.2rem, 7vw + 1rem, 3rem) !important;
    min-width: clamp(2.1rem, 6vw + 0.75rem, 2.85rem) !important;
  }

  .features-grid .feature-title {
    font-size: 20px !important;
    line-height: 1.1 !important;
  }

  .features-grid .feature-desc {
    font-size: 14px !important;
    line-height: 1.38 !important;
  }

  .pricing-grid-glass th,
  .pricing-grid-glass td,
  .commit-grid-2 th,
  .commit-grid-2 td {
    font-size: 13px !important;
    padding: 7px 7px !important;
  }

  .pricing-grid-glass .row-label,
  .commit-grid-2 .row-label {
    min-width: 0 !important;
    font-size: 13px !important;
  }

  .mobile-plan-tabs .mpt-btn {
    font-size: 11px;
    padding: 7px 4px;
  }

  footer {
    padding-bottom: 12px !important;
  }

  .mobile-faq-accordion {
    margin-left: 8px;
    margin-right: 8px;
    padding: 9px;
  }

  .mobile-faq-accordion h3 {
    font-size: 15px;
  }

  .mobile-faq-accordion summary,
  .mobile-faq-accordion p {
    font-size: 12px;
  }
}

@media (max-width: 430px) {
  .mobile-plan-tabs .mpt-btn {
    font-size: 10px;
    padding: 6px 3px;
  }

  .mps-title {
    font-size: 16px;
  }

  .mps-price {
    font-size: 21px;
  }

  .mps-sub {
    font-size: 12px;
  }

  .pricing-grid-glass th,
  .pricing-grid-glass td,
  .commit-grid-2 th,
  .commit-grid-2 td {
    font-size: 12px !important;
    padding: 6px 6px !important;
  }
}

@media (max-width: 390px) {
  .features-grid .feature-ico {
    width: clamp(2rem, 6.5vw + 0.85rem, 2.75rem) !important;
    height: clamp(2rem, 6.5vw + 0.85rem, 2.75rem) !important;
    min-width: clamp(1.9rem, 6vw + 0.5rem, 2.6rem) !important;
  }

  .features-grid.features-wide > div {
    gap: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  .chatbot-window {
    height: 62vh !important;
    max-height: 62vh !important;
  }
}
