/* Mobile/tablet overrides for page-smart-intercom.php */

@media (max-width: 899px) {
  .page-template-page-smart-intercom .main.smart-intercom-main {
    overflow-x: clip;
  }

  .smart-intercom-main {
    padding-inline: 0;
  }

  .si-hero {
    position: relative;
    min-height: 120px;
    margin-bottom: 10px;
  }

  .si-hero__copy {
    width: 100%;
    max-width: none;
  }

  .si-hero p {
    max-width: 48%;
    margin-top: 14px;
  }

  .si-hero__image {
    position: absolute;
    right: 0;
    top: 20px;
    width: min(230px, 44vw);
    margin: 0;
    transform: none;
    z-index: 0;
  }

  .si-app {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0;
    overflow: visible;
  }

  .si-app::after {
    display: none;
  }

  .si-app__feature-box {
    width: 100% !important;
    height: auto !important;
    min-height: 0;
    margin: 0;
    padding: 24px 16px 20px;
    border: 1px solid rgba(226, 226, 226, 0.9);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    clip-path: none;
    -webkit-clip-path: none;
    overflow: hidden;
  }

  .si-app__feature-box::before {
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 240, 0.86));
    border-radius: inherit;
    border: 1px solid rgba(255, 223, 194, 0.85);
    background-image: none;
  }

  .si-app h2 {
    align-items: flex-start;
    gap: 6px;
  }

  .si-feature-list {
    width: 100%;
    margin-top: 18px;
  }

  .si-feature-list li {
    min-height: 0;
    padding-top: 10px;
    padding-bottom: 10px;
    line-height: 18px;
    align-items: flex-start;
  }

  .si-feature-list li::after,
  .si-feature-list li::before {
    top: 50%;
    transform: translateY(-50%);
  }

  .si-feature-list li::after {
    left: 2px;
    width: 18px;
    height: 10px;
    border-radius: 999px;
    box-shadow: inset 0 0.8px 1.4px rgba(0, 0, 0, 0.18);
  }

  .si-feature-list li::before {
    left: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
  }

  .si-app__desc {
    margin-top: 18px;
    max-width: 100%;
  }

  .si-install-section {
    width: 100% !important;
    max-width: 100% !important;
    top: 0;
    margin: 12px 0 0;
    border-radius: 22px;
  }

  .si-install-section::after {
    border-radius: 22px;
  }

  .si-install {
    padding: 18px 14px;
    border-radius: 22px;
  }

  .si-install::before {
    border-radius: 22px;
  }

  .si-install__head {
    align-items: start;
  }

  .si-install__head h3 {
    line-height: 1.25;
    max-width: 100%;
  }

  .si-install__stores {
    flex-direction: row;
    gap: 8px;
  }

  .si-install__stores a {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }

  .si-install__stores img {
    width: 100%;
    max-width: 100%;
  }

  .si-install__cta {
    min-height: 56px;
    height: auto;
    padding: 12px 14px;
    white-space: normal;
  }

  .si-tariffs {
    margin-top: 40px;
  }

  .si-tariffs__head {
    position: relative;
    min-height: 120px;
  }

  .si-tariffs__head p:first-of-type {
    margin-top: 14px;
  }

  .si-tariffs__head p {
    max-width: 80%;
  }

  .si-tariffs__head img {
    position: absolute;
    right: -29px;
    top: 7px;
    width: min(201px, 51vw);
    transform: rotate(12deg);
    z-index: 1;
  }

  .si-tariff,
  .si-tariff:last-child,
  .si-tariff.is-featured {
    min-height: 0;
    border-radius: 20px;
    padding: 22px 16px 18px;
  }

  .si-tariff::after {
    border-radius: 20px;
  }

  .si-tariff h3 {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.6em;
    text-wrap: balance;
  }

  .si-tariff__list {
    margin-top: 18px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .si-tariff li {
    margin-bottom: 12px;
    padding: 8px 10px 8px 28px;
    border-radius: 0 10px 10px 0;
    background: linear-gradient(90deg, rgba(255, 122, 28, 0.09), rgba(255, 255, 255, 0));
    border-left: 2px solid rgba(255, 122, 28, 0.28);
    line-height: 1.25;
  }

  .si-tariff li::before {
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
  }

  .si-tariff li::after {
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
  }

  .si-tariff li.has-feature-icon {
    padding-left: 28px;
  }

  .si-tariff li.has-feature-icon::before,
  .si-tariff li.has-feature-icon::after {
    display: none;
  }

  .si-tariff li.has-feature-icon .si-tariff__feature-icon {
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
  }

  .si-tariff li.has-feature-icon .si-tariff__feature-main {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 6px;
    white-space: nowrap;
  }

  .si-tariff li:nth-child(2)::before {
    top: 50%;
    transform: translateY(-50%);
  }

  .si-tariff li small {
    display: block;
    margin: 4px 0 0 0;
  }

  .si-tariff__price {
    margin-top: 18px;
    width: 100%;
    justify-content: center;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 8px;
    text-align: center;
  }

  .si-tariff__price span {
    margin-left: 0;
  }

  .si-tariff__btn {
    max-width: 100%;
    width: 100%;
    min-height: 46px;
  }

  .si-tariff__note {
    margin-top: 12px;
  }

  .si-classic {
    margin-top: 52px;
  }

  .si-classic__head img {
    width: min(220px, 62vw);
    position: absolute;
    right: 0;
    top: 8px;
    z-index: -1;
  }

  .si-classic__head p {
    position: relative;
    z-index: 1;
    max-width: 62%;
    padding: 8px 10px;
    border-radius: 12px;
  }

  .si-panel,
  .si-panel--install,
  .si-panel--keys,
  .si-panel--palette {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-top: 12px;
  }

  .si-panel {
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
  }

  .si-panel::after {
    display: none;
  }

  .si-panel--install {
    margin-top: 0;
  }

  .si-panel--keys,
  .si-panel--palette {
    min-height: 0;
  }

  .si-price-row {
    min-height: 0;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .si-panel--install .si-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .si-panel--install .si-price-row b {
    color: #000;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0;
    border: 0;
    background: transparent;
    -webkit-text-stroke: 0;
    text-shadow: none;
  }

  .si-panel--install .si-price-row b span {
    margin-left: 0;
    color: #000;
  }

  .si-price-row span {
    padding-right: 10px;
  }

  .si-panel h3 {
    word-break: break-word;
  }

  .si-panel--palette h3 {
    padding-top: 24px;
  }

  .si-keys {
    padding-bottom: 14px;
  }

  .si-keys li {
    min-height: 0;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .si-panel--keys .si-keys li {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
  }

  .si-panel--keys .si-keys span,
  .si-panel--keys .si-keys b {
    white-space: nowrap;
  }

  .si-keys span,
  .si-keys b {
    line-height: 1.15;
  }

  .si-palette {
    gap: 8px;
    align-items: stretch;
  }

  .si-palette img {
    object-fit: contain;
    background: rgba(255, 255, 255, 0.45);
    border-radius: 10px;
  }

  .si-connect {
    margin-top: 44px;
    padding-top: 24px;
  }

  .si-connect__grid {
    margin-top: 20px;
    row-gap: 20px;
  }

  .si-form label {
    margin-bottom: 14px;
    padding-left: 0;
  }

  .si-form input {
    width: 100%;
    max-width: 100%;
  }

  .si-form__bottom {
    gap: 12px;
  }

  .si-form__bottom .btn {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .si-form__bottom small {
    padding-left: 22px;
  }

  .si-form__bottom i {
    top: 1px;
  }

  .si-contacts {
    padding-top: 16px;
  }

  .si-contacts h3 {
    margin-bottom: 18px;
    line-height: 1.2;
  }

  .si-contacts a {
    word-break: break-word;
  }
}

@media (max-width: 767px) {
  .smart-intercom-main {
    padding-bottom: 36px;
  }

  .si-hero {
    margin-bottom: 22px;
  }

  .si-hero h1 {
    font-size: 23px;
    line-height: 1.25;
  }

  .si-hero p {
    font-size: 17px;
    line-height: 1.3;
    max-width: 52%;
  }

  .si-app h2 {
    font-size: 14px;
    line-height: 20px;
  }

  .si-feature-list li {
    font-size: 13px;
  }

  .si-app__desc {
    font-size: 14px;
    line-height: 21px;
  }

  .si-install__head {
    grid-template-columns: 48px minmax(0, 1fr);
    column-gap: 10px;
  }

  .si-install__head img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
  }

  .si-install__head h3 {
    font-size: 16px;
  }

  .si-install__cta {
    font-size: 14px;
    line-height: 1.25;
  }

  .si-tariffs__head h2,
  .si-classic__head h2 {
    line-height: 1.2;
  }

  .si-tariff h3 {
    font-size: 20px;
    line-height: 1.25;
  }

  .si-tariff__price {
    font-size: 26px;
    line-height: 1.2;
  }

  .si-tariff__price span {
    font-size: 20px;
    line-height: 1.2;
  }

  .si-price-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 8px;
  }

  .si-panel--install .si-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .si-price-row span,
  .si-price-row b {
    font-size: 16px;
    line-height: 1.25;
  }

  .si-panel h3 {
    font-size: 16px;
    line-height: 1.25;
    padding-right: 12px;
  }

  .si-keys li {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .si-keys img {
    width: 26px;
    height: 36px;
  }

  .si-keys span,
  .si-keys b {
    font-size: 15px;
  }

  .si-palette {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .si-palette img {
    height: 96px;
  }

  .si-connect h2 {
    font-size: 26px;
    line-height: 1.2;
  }

  .si-connect h2 span::after {
    right: -13px;
    top: 14px;
  }

  .si-form__bottom small {
    font-size: 11px;
    line-height: 15px;
  }

  .si-contacts h3 {
    font-size: 20px;
  }

  .si-contacts a {
    font-size: 15px;
    line-height: 22px;
    margin-bottom: 16px;
  }
}

@media (max-width: 479px) {
  .si-hero {
    min-height: 112px;
  }

  .si-hero__image {
    top: 20px;
    right: -25px;
  }

  .si-hero p {
    max-width: 56%;
  }

  .si-classic__head p {
    max-width: 68%;
    padding: 6px 8px;
  }

  .si-feature-list li {
    padding-left: 27px;
  }

  .si-feature-list li::after {
    width: 16px;
    height: 9px;
    left: 1px;
  }

  .si-feature-list li::before {
    left: 8px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
  }

  .si-tariff {
    padding-inline: 14px;
  }

  .si-tariff__btn {
    font-size: 14px;
  }

  .si-price-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .si-panel--install .si-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: nowrap;
  }

  .si-panel--install .si-price-row b {
    color: #000;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0;
    border: 0;
    background: transparent;
    -webkit-text-stroke: 0;
    font-size: 14px;
    line-height: 1.2;
    text-shadow: none;
  }

  .si-panel--install .si-price-row b span {
    color: #000;
  }

  .si-price-row b {
    justify-self: start;
  }

  .si-keys li {
    grid-template-columns: 30px 1fr;
    grid-template-areas:
      "icon title"
      "icon price";
    align-items: center;
    gap: 6px 8px;
  }

  .si-keys img {
    grid-area: icon;
  }

  .si-keys span {
    grid-area: title;
  }

  .si-keys b {
    grid-area: price;
  }

  .si-panel--keys .si-keys li {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    grid-template-areas: none;
    align-items: center;
  }

  .si-panel--keys .si-keys img,
  .si-panel--keys .si-keys span,
  .si-panel--keys .si-keys b {
    grid-area: auto;
  }

  .si-panel--keys .si-keys span,
  .si-panel--keys .si-keys b {
    white-space: nowrap;
    font-size: 13px;
    line-height: 1.15;
  }

  .si-connect h2 {
    font-size: 24px;
  }
}
