/* ===== SMS_CONTACTS_MOBILE_FIX_V1_START ===== */

@media (max-width: 760px) {
  html.sms-contacts-mobile-page,
  html.sms-contacts-mobile-page body {
    max-width: 100%;
    overflow-x: hidden;
  }

  html.sms-contacts-mobile-page .content,
  html.sms-contacts-mobile-page .contacts-page,
  html.sms-contacts-mobile-page .contacts-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  html.sms-contacts-mobile-page .contacts-card {
    padding: 14px !important;
    border-radius: 16px !important;
  }

  html.sms-contacts-mobile-page .contacts-head {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  html.sms-contacts-mobile-page .contacts-head h1,
  html.sms-contacts-mobile-page .contacts-head p {
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  html.sms-contacts-mobile-page .contacts-head .primary {
    width: 100% !important;
    min-height: 44px !important;
    box-sizing: border-box !important;
  }

  html.sms-contacts-mobile-page .filters {
    display: grid !important;
    width: 100% !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    box-sizing: border-box !important;
  }

  html.sms-contacts-mobile-page .filters > * {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  html.sms-contacts-mobile-page .selected-bar {
    display: flex !important;
    width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 14px !important;
    box-sizing: border-box !important;
  }

  html.sms-contacts-mobile-page .selected-bar > div {
    display: grid !important;
    width: 100% !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  html.sms-contacts-mobile-page .selected-bar .ghost {
    width: 100% !important;
    min-height: 44px !important;
    margin-left: 0 !important;
    white-space: normal !important;
    box-sizing: border-box !important;
  }

  html.sms-contacts-mobile-page table.contacts-mobile-table {
    --sms-contacts-mobile-fix-v1: 1;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    table-layout: auto !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  html.sms-contacts-mobile-page table.contacts-mobile-table thead {
    display: none !important;
  }

  html.sms-contacts-mobile-page table.contacts-mobile-table tbody {
    display: block !important;
    width: 100% !important;
  }

  html.sms-contacts-mobile-page table.contacts-mobile-table tbody tr {
    display: block !important;
    width: 100% !important;
    margin: 0 0 10px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    background: #fff !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  html.sms-contacts-mobile-page
  table.contacts-mobile-table tbody td[data-sms-label] {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 44px !important;
    padding: 10px 12px !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 14px !important;
    border: 0 !important;
    border-bottom: 1px solid #edf2f7 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    text-align: right !important;
    box-sizing: border-box !important;
  }

  html.sms-contacts-mobile-page
  table.contacts-mobile-table tbody td[data-sms-label]::before {
    content: attr(data-sms-label);
    flex: 0 0 38%;
    color: #64748b;
    font-weight: 800;
    text-align: left;
    overflow-wrap: anywhere;
  }

  html.sms-contacts-mobile-page
  table.contacts-mobile-table tbody td[data-sms-label]:last-child {
    border-bottom: 0 !important;
  }

  html.sms-contacts-mobile-page
  table.contacts-mobile-table tbody td.check input {
    width: 20px !important;
    height: 20px !important;
    flex: 0 0 20px !important;
  }

  html.sms-contacts-mobile-page
  table.contacts-mobile-table tbody td[colspan] {
    display: block !important;
    width: 100% !important;
    min-height: 82px !important;
    padding: 28px 12px !important;
    border: 0 !important;
    text-align: center !important;
    white-space: normal !important;
    box-sizing: border-box !important;
  }

  html.sms-contacts-mobile-page
  table.contacts-mobile-table .danger {
    max-width: 100% !important;
    min-height: 38px !important;
    white-space: normal !important;
  }

  html.sms-contacts-mobile-page .modal-mask {
    padding: 12px !important;
    align-items: flex-start !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
  }

  html.sms-contacts-mobile-page .modal {
    width: 100% !important;
    max-width: 420px !important;
    min-width: 0 !important;
    max-height: calc(100vh - 24px) !important;
    margin: 0 auto !important;
    padding: 18px !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
  }

  html.sms-contacts-mobile-page .modal input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  html.sms-contacts-mobile-page .modal-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  html.sms-contacts-mobile-page .modal-actions button {
    width: 100% !important;
    min-height: 44px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  html.sms-contacts-mobile-page
  :is(
    #chat-widget,
    #customer-service,
    .chat-widget,
    .chat-float,
    .float-chat,
    .customer-service,
    [class*="chat-widget"],
    [class*="chat-float"],
    [class*="customer-service"]
  ) {
    display: none !important;
  }
}

/* ===== SMS_CONTACTS_MOBILE_FIX_V1_END ===== */
