/*
 * Nobel Deal SMM mobile compatibility layer v2.4.4
 * Mobile/tablet rules only. Desktop presentation (881px and above) is unchanged.
 * v2.4.4 keeps dialogs above the mobile navigation and reserves the complete safe area.
 */

html.smm-dialog-open,
html.smm-dialog-open body {
  overflow: hidden;
}

@media (max-width: 880px) {
  .smm-pro,
  .smm-pro-dashboard {
    overflow-x: clip;
    padding: 32px 0 48px;
  }

  .smm-pro .container,
  .smm-pro-dashboard .container {
    width: min(100% - 24px, 1180px);
  }

  .smm-pro-command-hero,
  .smm-pro-order-layout {
    min-width: 0;
  }

  .smm-pro-command-copy,
  .smm-pro-command-card,
  .smm-pro-explorer,
  .smm-pro-order-banner,
  .smm-pro-order-card,
  .smm-pro-wallet-card,
  .smm-pro-side-card,
  .smm-pro-dashboard-head,
  .smm-pro-table-card {
    min-width: 0;
  }

  .smm-pro-command-copy h1,
  .smm-pro-command-copy > p,
  .smm-pro-order-banner h1,
  .smm-pro-order-banner p,
  .smm-pro-dashboard-head h1,
  .smm-pro-dashboard-head p,
  .smm-pro-service-card h3,
  .smm-pro-service-card p,
  .smm-pro-description,
  .smm-pro-side-card > p,
  .smm-pro-modal-section p,
  .smm-pro-summary-list strong {
    overflow-wrap: anywhere;
    word-break: normal;
  }

  /*
   * Horizontal platform/category rail.
   * The parent must be width-constrained; otherwise the flex row grows with
   * its children and no internal overflow area is created on mobile browsers.
   */
  .smm-pro-explorer,
  .smm-pro-platform-rail,
  .smm-pro-catalog-panel,
  .smm-pro-form-section {
    min-width: 0;
    max-width: 100%;
  }

  .smm-pro-platform-rail {
    width: 100%;
    overflow: hidden;
  }

  .smm-pro-platforms.smm-pro-platforms-vertical,
  .smm-pro-order-platform-list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    scrollbar-width: none;
    touch-action: pan-x pan-y;
    cursor: grab;
  }

  .smm-pro-platforms.smm-pro-platforms-vertical::-webkit-scrollbar,
  .smm-pro-order-platform-list::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .smm-pro-platforms.smm-pro-platforms-vertical.is-dragging,
  .smm-pro-order-platform-list.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    user-select: none;
  }

  .smm-pro-platforms.smm-pro-platforms-vertical .smm-pro-platform,
  .smm-pro-order-platform-list .smm-pro-platform {
    flex: 0 0 auto !important;
    scroll-snap-align: start;
    min-height: 48px;
    touch-action: pan-x pan-y;
  }

  .smm-pro-btn,
  .smm-pro-submit,
  .smm-popup-channel,
  .smm-pro-modal-close,
  .smm-modal-close {
    touch-action: manipulation;
  }

  .smm-pro-modal,
  .smm-connect-modal {
    padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  }

  .smm-pro-modal-card,
  .smm-connect-card {
    max-width: 100%;
    max-height: min(90dvh, 760px);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 650px) {
  .smm-pro,
  .smm-pro-dashboard {
    padding: 22px 0 38px;
  }

  .smm-pro .container,
  .smm-pro-dashboard .container {
    width: calc(100% - 20px);
  }

  .smm-pro-command-hero {
    gap: 14px;
    margin-bottom: 14px;
  }

  .smm-pro-command-copy,
  .smm-pro-command-card {
    border-radius: 18px;
  }

  .smm-pro-command-copy {
    padding: 24px 18px;
  }

  .smm-pro-command-copy::after {
    width: 160px;
    height: 160px;
    right: -80px;
    top: -85px;
  }

  .smm-pro-command-copy h1 {
    margin: 14px 0 12px;
    font-size: clamp(30px, 9vw, 38px);
    line-height: 1.08;
    letter-spacing: -0.035em;
  }

  .smm-pro-command-copy > p {
    font-size: 13px;
    line-height: 1.65;
  }

  .smm-pro-command-actions,
  .smm-pro-order-banner-actions,
  .smm-pro-dashboard-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 8px;
  }

  .smm-pro-command-actions .smm-pro-btn,
  .smm-pro-order-banner-actions .smm-pro-btn,
  .smm-pro-dashboard-actions .smm-pro-btn,
  .smm-pro-command-actions .smm-pro-text-link {
    width: 100%;
    min-height: 46px;
    justify-content: center;
    text-align: center;
  }

  .smm-pro-command-actions .smm-pro-text-link {
    display: flex;
    align-items: center;
  }

  .smm-pro-assurance-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
  }

  .smm-pro-command-card {
    padding: 17px;
  }

  .smm-pro-command-card-head {
    gap: 10px;
  }

  .smm-pro-status-orb {
    width: 48px;
    height: 48px;
  }

  .smm-pro-overview-grid {
    gap: 8px;
  }

  .smm-pro-overview-grid > div {
    padding: 12px;
  }

  .smm-pro-overview-grid strong {
    font-size: 21px;
  }

  .smm-pro-explorer {
    border-radius: 18px;
  }

  .smm-pro-platform-rail {
    padding: 14px 14px 10px;
  }

  .smm-pro-rail-heading {
    padding: 2px 2px 11px;
  }

  .smm-pro-platforms.smm-pro-platforms-vertical {
    margin-inline: -2px;
    width: calc(100% + 4px);
    max-width: calc(100% + 4px);
    padding: 0 2px 7px;
  }

  .smm-pro-platforms.smm-pro-platforms-vertical .smm-pro-platform {
    min-width: 148px;
    max-width: 175px;
  }

  .smm-pro-platform small {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .smm-pro-catalog-panel {
    padding: 14px;
  }

  .smm-pro-catalog-head {
    gap: 12px;
  }

  .smm-pro-catalog-head h2 {
    margin-top: 7px;
    font-size: 23px;
    line-height: 1.2;
  }

  .smm-pro-result-count,
  .smm-pro-result-count.compact {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    justify-content: flex-start;
  }

  .smm-pro-search-row {
    margin: 14px 0;
  }

  .smm-pro-search {
    min-width: 0;
    min-height: 48px;
  }

  .smm-pro-search input,
  .smm-pro-input,
  .smm-pro-select,
  .smm-pro-textarea {
    min-width: 0;
    font-size: 16px; /* avoids automatic iOS input zoom */
  }

  .smm-pro-grid {
    gap: 11px;
  }

  .smm-pro-service-card {
    min-height: 0;
    padding: 15px;
    border-radius: 16px;
  }

  .smm-pro-service-top {
    align-items: flex-start;
  }

  .smm-pro-service-platform {
    min-width: 0;
    max-width: 62%;
  }

  .smm-pro-service-platform > span:last-child {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .smm-pro-service-card h3 {
    font-size: 15px;
  }

  .smm-pro-service-card p {
    -webkit-line-clamp: 4;
  }

  .smm-pro-service-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .smm-pro-service-meta > div {
    min-width: 0;
    padding: 9px 7px;
  }

  .smm-pro-service-meta strong {
    font-size: 9px;
  }

  .smm-pro-service-footer {
    align-items: flex-end;
  }

  .smm-pro-service-footer > div {
    min-width: 0;
  }

  .smm-pro-rate {
    font-size: 17px;
    overflow-wrap: anywhere;
  }

  .smm-pro-service-footer .smm-pro-btn {
    flex: 0 0 auto;
    min-height: 42px;
  }

  .smm-pro-safety-strip {
    margin-top: 14px;
    border-radius: 16px;
  }

  .smm-pro-safety-strip > div {
    padding: 15px;
  }

  .smm-pro-order-banner,
  .smm-pro-dashboard-head {
    gap: 18px;
    padding: 22px 18px;
    border-radius: 18px;
  }

  .smm-pro-order-banner h1,
  .smm-pro-dashboard-head h1 {
    margin: 10px 0 7px;
    font-size: clamp(30px, 9vw, 36px);
    line-height: 1.1;
  }

  .smm-pro-order-banner p,
  .smm-pro-dashboard-head p {
    font-size: 12px;
    line-height: 1.6;
  }

  .smm-pro-order-card {
    border-radius: 18px;
  }

  .smm-pro-order-head {
    align-items: flex-start;
    padding: 17px;
  }

  .smm-pro-order-step {
    min-width: 0;
  }

  .smm-pro-order-step > span {
    flex: 0 0 39px;
    width: 39px;
    height: 39px;
  }

  .smm-pro-order-step h2 {
    font-size: 16px;
    line-height: 1.3;
  }

  .smm-pro-secure-label {
    display: none;
  }

  .smm-pro-form {
    padding: 13px;
  }

  .smm-pro-form-section {
    padding: 14px;
    border-radius: 14px;
  }

  .smm-pro-section-title {
    display: block;
  }

  .smm-pro-section-title small {
    display: block;
    margin-top: 4px;
    line-height: 1.45;
  }

  .smm-pro-order-platform-list .smm-pro-platform {
    min-width: 128px;
  }

  .smm-pro-description {
    min-height: 0;
  }

  .smm-pro-checkout-bar {
    padding: 13px;
  }

  .smm-pro-checkout-prices {
    gap: 8px;
  }

  .smm-pro-checkout-prices > div {
    min-width: 0;
    padding: 11px;
  }

  .smm-pro-checkout-prices strong {
    font-size: 18px;
    overflow-wrap: anywhere;
  }

  .smm-pro-submit {
    min-height: 54px;
  }

  .smm-pro-command-side {
    display: flex;
    gap: 11px;
  }

  .smm-pro-wallet-card,
  .smm-pro-side-card {
    padding: 15px;
    border-radius: 16px;
  }

  .smm-pro-wallet-card strong {
    font-size: 22px;
  }

  .smm-pro-summary-list > div {
    align-items: flex-start;
  }

  .smm-pro-summary-list span {
    flex: 0 0 42%;
  }

  .smm-pro-summary-list strong {
    min-width: 0;
    max-width: 58%;
  }

  .smm-pro-stats {
    gap: 9px;
  }

  .smm-pro-stat {
    gap: 9px;
    min-width: 0;
    padding: 14px 11px;
  }

  .smm-pro-stat > span {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
  }

  .smm-pro-stat strong {
    font-size: 22px;
  }

  .smm-pro-table-card {
    border-radius: 17px;
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .smm-pro-table-head {
    padding: 17px 15px;
    border: 1px solid var(--smm-line);
    border-radius: 17px;
    background: linear-gradient(155deg, rgba(18,43,62,.95), rgba(7,23,36,.96));
  }

  .smm-pro-table-wrap {
    overflow: visible;
    margin-top: 10px;
  }

  .smm-pro-table {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .smm-pro-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .smm-pro-table tbody {
    display: grid;
    gap: 10px;
  }

  .smm-pro-table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--smm-line);
    border-radius: 16px;
    background: linear-gradient(155deg, rgba(18,43,62,.95), rgba(7,23,36,.96));
    box-shadow: 0 16px 35px rgba(0,0,0,.2);
  }

  .smm-pro-table tbody tr:nth-child(even),
  .smm-pro-table tbody tr:hover {
    background: linear-gradient(155deg, rgba(18,43,62,.95), rgba(7,23,36,.96));
  }

  .smm-pro-table td {
    display: block;
    min-width: 0;
    padding: 11px 12px;
    border: 0;
    border-bottom: 1px solid var(--smm-line);
    font-size: 11px;
    overflow-wrap: anywhere;
  }

  .smm-pro-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 5px;
    color: #6f8497;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  .smm-pro-table td:nth-child(1),
  .smm-pro-table td:nth-child(2),
  .smm-pro-table td:nth-child(7) {
    grid-column: 1 / -1;
  }

  .smm-pro-table td:nth-child(2) {
    background: rgba(255,255,255,.018);
  }

  .smm-pro-table td:nth-child(6) {
    border-bottom: 1px solid var(--smm-line);
  }

  .smm-pro-table td:nth-child(7) {
    border-bottom: 0;
  }

  .smm-pro-table td strong,
  .smm-pro-table td small {
    font-size: inherit;
  }

  .smm-pro-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .smm-pro-actions > *,
  .smm-pro-actions form,
  .smm-pro-actions .smm-pro-btn,
  .smm-pro-actions form .smm-pro-btn {
    width: 100%;
  }

  .smm-pro-actions .smm-pro-btn {
    min-height: 42px;
  }

  .smm-pro-empty-row {
    display: block !important;
  }

  .smm-pro-empty-row td {
    display: block;
    border: 0;
  }

  .smm-pro-empty-row td::before {
    display: none;
  }

  .smm-pro-empty {
    padding: 38px 14px;
  }

  .smm-pro-modal,
  .smm-connect-modal {
    place-items: end center;
    padding: 0;
  }

  .smm-pro-modal-card,
  .smm-connect-card {
    width: 100%;
    max-height: 92dvh;
    margin: 0;
    padding: 22px 17px calc(18px + env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 22px 22px 0 0;
  }

  .smm-pro-modal-card h2,
  .smm-connect-card h2 {
    font-size: 23px;
    overflow-wrap: anywhere;
  }

  .smm-pro-modal-close,
  .smm-modal-close {
    width: 44px;
    height: 44px;
    right: 10px;
    top: 10px;
  }

  .smm-pro-modal-tags {
    gap: 6px;
  }

  .smm-pro-modal-tags span {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .smm-connect-brand {
    width: 58px;
    height: 58px;
    margin-bottom: 13px;
  }

  .smm-popup-channel {
    min-height: 50px;
  }

  .smm-dont-show {
    align-items: flex-start;
    text-align: left;
  }

  .smm-dont-show input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 420px) {
  .smm-pro .container,
  .smm-pro-dashboard .container {
    width: calc(100% - 14px);
  }

  .smm-pro-command-copy {
    padding: 21px 15px;
  }

  .smm-pro-command-copy h1,
  .smm-pro-order-banner h1,
  .smm-pro-dashboard-head h1 {
    font-size: 29px;
  }

  .smm-pro-overview-grid {
    grid-template-columns: 1fr 1fr;
  }

  .smm-pro-overview-grid > div {
    padding: 10px;
  }

  .smm-pro-platforms.smm-pro-platforms-vertical .smm-pro-platform {
    min-width: 140px;
  }

  .smm-pro-catalog-panel,
  .smm-pro-form,
  .smm-pro-form-section {
    padding: 12px;
  }

  .smm-pro-service-meta {
    grid-template-columns: 1fr 1fr;
  }

  .smm-pro-service-meta > div:last-child {
    grid-column: 1 / -1;
  }

  .smm-pro-service-footer {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .smm-pro-service-footer .smm-pro-btn {
    width: 100%;
  }

  .smm-pro-checkout-prices {
    grid-template-columns: 1fr;
  }

  .smm-pro-stats {
    grid-template-columns: 1fr 1fr;
  }

  .smm-pro-stat {
    align-items: flex-start;
  }

  .smm-pro-stat > span {
    display: none;
  }

  .smm-pro-table tbody tr {
    grid-template-columns: 1fr;
  }

  .smm-pro-table td,
  .smm-pro-table td:nth-child(n) {
    grid-column: 1;
  }

  .smm-pro-actions {
    grid-template-columns: 1fr;
  }

  .smm-pro-modal-card,
  .smm-connect-card {
    padding-inline: 14px;
  }
}

@media (max-width: 880px) and (orientation: landscape) and (max-height: 560px) {
  .smm-pro-modal-card,
  .smm-connect-card {
    max-height: 96dvh;
    border-radius: 18px 18px 0 0;
  }
}

/*
 * v2.4.4 — modal/footer stacking correction.
 * SMM sections create an isolated stacking context, so a fixed dialog nested
 * inside them can otherwise appear below the global mobile navigation.
 */
html.smm-dialog-open .mobile-bottom-nav,
html.smm-dialog-open .whatsapp-float,
html.smm-dialog-open .mobile-feature-panel {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

html.smm-dialog-open .smm-pro,
html.smm-dialog-open .smm-pro-dashboard {
  z-index: 10000 !important;
}

html.smm-dialog-open .smm-pro-modal {
  z-index: 10050;
}

@media (max-width: 760px) {
  html.smm-dialog-open body {
    padding-bottom: 0 !important;
  }

  .smm-pro-modal {
    z-index: 10050 !important;
    align-items: end;
    overflow: hidden;
  }

  .smm-pro-modal-card {
    max-height: calc(100dvh - max(12px, env(safe-area-inset-top))) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding-bottom: calc(28px + env(safe-area-inset-bottom)) !important;
    scroll-padding-bottom: calc(28px + env(safe-area-inset-bottom));
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }

  .smm-pro-modal-card > :last-child {
    margin-bottom: 0 !important;
  }
}
