/* Mobile UX refinements. Loaded globally, applied only to phone layouts. */

@media (max-width: 767px) {
  html {
    scroll-padding-top: 88px;
  }

  body.urs-mobile-refinements {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
    overflow-wrap: anywhere;
  }

  body.urs-mobile-refinements footer {
    padding-bottom: calc(24px + env(safe-area-inset-bottom)) !important;
  }

  body.urs-mobile-refinements .mobile_fixed {
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  }

  body.urs-mobile-refinements .mobile_fixed button {
    min-height: 50px;
    font-size: 16px !important;
    box-shadow: 0 8px 24px rgba(31, 41, 55, .18);
  }

  body.urs-mobile-cta-near-footer .mobile_fixed {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(110%);
  }

  body.urs-mobile-refinements main {
    min-width: 0;
  }

  body.urs-mobile-refinements h1,
  body.urs-mobile-refinements .h1 {
    font-size: clamp(27px, 7.2vw, 32px) !important;
    line-height: 1.15;
    letter-spacing: -.02em;
  }

  body.urs-mobile-refinements h2,
  body.urs-mobile-refinements .h2 {
    font-size: clamp(22px, 5.8vw, 26px) !important;
    line-height: 1.22;
    letter-spacing: -.015em;
  }

  body.urs-mobile-refinements h3,
  body.urs-mobile-refinements .h3 {
    font-size: 19px !important;
    line-height: 1.3;
  }

  body.urs-mobile-refinements .contents p,
  body.urs-mobile-refinements .contents li,
  body.urs-mobile-refinements .text_op p,
  body.urs-mobile-refinements .services-3-approved p,
  body.urs-mobile-refinements .services-3-approved li {
    font-size: 16px;
    line-height: 1.58;
  }

  body.urs-mobile-refinements input:not([type="checkbox"]):not([type="radio"]),
  body.urs-mobile-refinements select,
  body.urs-mobile-refinements textarea {
    min-height: 48px;
  }

  body.urs-mobile-refinements .form-check {
    min-height: 44px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
  }

  body.urs-mobile-refinements .form-check-input {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    margin-top: 2px;
  }

  body.urs-mobile-refinements .pagination {
    gap: 4px;
    flex-wrap: wrap;
  }

  body.urs-mobile-refinements .pagination .page-link,
  body.urs-mobile-refinements .pagination a,
  body.urs-mobile-refinements .pagination span {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
  }

  body.urs-mobile-refinements footer p {
    line-height: 1.5;
  }

  body.urs-mobile-refinements footer p a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  body.urs-mobile-refinements footer p a:has(img) {
    width: 42px;
    height: 44px;
    justify-content: center;
    margin-right: 0 !important;
  }

  body.urs-mobile-refinements footer p a img {
    width: 32px;
    height: 32px;
  }

  body.urs-mobile-refinements .swiper-pagination-bullet,
  body.urs-mobile-refinements .flickity-page-dots .dot {
    width: 10px;
    height: 10px;
    margin: 0 6px;
  }

  body.urs-mobile-refinements .swiper-pagination-bullet-active,
  body.urs-mobile-refinements .flickity-page-dots .dot.is-selected {
    transform: scale(1.25);
  }

  .urs-mobile-search {
    position: relative;
    margin: 16px 0 22px;
  }

  .urs-mobile-search input {
    width: 100%;
    height: 50px;
    padding: 0 48px 0 46px;
    border: 1px solid #c8d7e6;
    border-radius: 12px;
    background: #fff;
    color: #1f2937;
    font-size: 16px;
    box-shadow: 0 5px 18px rgba(15, 76, 129, .06);
  }

  .urs-mobile-search input:focus {
    outline: 3px solid rgba(0, 101, 177, .13);
    border-color: #0065b1;
  }

  .urs-mobile-search__icon,
  .urs-mobile-search__clear {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .urs-mobile-search__icon {
    left: 14px;
    width: 22px;
    height: 22px;
    color: #0065b1;
    pointer-events: none;
  }

  .urs-mobile-search__icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
  }

  .urs-mobile-search__clear {
    right: 4px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #6b7280;
    font-size: 26px;
  }

  .urs-mobile-search input:placeholder-shown + .urs-mobile-search__clear {
    opacity: 0;
    pointer-events: none;
  }

  /* Services catalog */
  .urs-service-catalog {
    padding-top: 24px !important;
  }

  .urs-service-catalog > .container.mt-4 {
    margin-top: 0 !important;
  }

  .urs-service-catalog h2 {
    text-align: left !important;
  }

  .urs-service-catalog__search {
    margin-top: -8px;
  }

  .urs-service-catalog ._col {
    margin-bottom: 12px !important;
  }

  .urs-service-catalog .service {
    position: relative;
    min-height: 0 !important;
    padding: 18px 52px 18px 18px !important;
    border: 1px solid #e2eaf2;
    border-radius: 14px;
    background: #f7fafc !important;
    height: auto !important;
  }

  .urs-service-catalog .service > .row {
    align-items: center;
  }

  .urs-service-catalog .service ._1,
  .urs-service-catalog .services_header img {
    width: 46px !important;
    height: 46px !important;
    min-height: 46px !important;
    background-size: 44px !important;
  }

  .urs-service-catalog .service ._2,
  .urs-service-catalog .service_title {
    margin: 0 !important;
    min-height: 44px;
    display: flex;
    align-items: center;
    font-size: 17px;
    line-height: 1.3;
  }

  .urs-service-toggle {
    position: absolute;
    top: 17px;
    right: 8px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: #eaf4fb;
    color: #0065b1;
  }

  .urs-service-toggle > span[aria-hidden="true"]::before,
  .urs-service-toggle > span[aria-hidden="true"]::after {
    content: "";
    position: absolute;
    top: 21px;
    left: 13px;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
  }

  .urs-service-toggle > span[aria-hidden="true"]::after {
    transform: rotate(90deg);
    transition: transform .2s ease;
  }

  .urs-service-toggle[aria-expanded="true"] > span[aria-hidden="true"]::after {
    transform: rotate(0);
  }

  .urs-service-catalog ._3 {
    margin-top: 14px;
  }

  .urs-service-catalog .urs-service-links--collapsed {
    display: none;
  }

  .urs-service-catalog ._3 a {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    margin: 0 !important;
    padding: 9px 10px;
    border-top: 1px solid #e3ebf2;
    border-radius: 0;
    background: transparent;
    text-align: left;
    white-space: normal;
  }

  .urs-service-catalog .service_link {
    position: static !important;
    min-height: 44px;
    display: flex;
    align-items: center;
    margin-top: 8px;
  }

  .urs-service-catalog .service ._4 {
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
  }

  .urs-service-card--hidden {
    display: none !important;
  }

  .urs-service-original-show {
    display: none !important;
  }

  .urs-service-catalog__more,
  .urs-topics__toggle {
    width: calc(100% - 24px);
    min-height: 48px;
    display: block;
    margin: 8px 12px 28px;
    border-radius: 10px;
  }

  /* Questions */
  .urs-question-search {
    margin-top: 0;
  }

  .urs-page-questions .yo-questions ._cell,
  .urs-page-lawyer-online .yo-questions ._cell {
    margin: 0 0 10px;
    padding: 15px 12px !important;
    border: 1px solid #e4ebf1;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(27, 54, 80, .05);
  }

  .urs-page-questions .yo-questions .question,
  .urs-page-lawyer-online .yo-questions .question {
    min-height: 44px;
    display: flex;
    align-items: center;
    font-size: 16px;
    line-height: 1.4;
  }

  .urs-page-questions .yo-questions .text-success,
  .urs-page-lawyer-online .yo-questions .text-success {
    min-width: 58px;
    padding: 7px 5px;
    border-radius: 10px;
    background: #ecf9ef;
  }

  .urs-page-questions .yo-questions .text-success b,
  .urs-page-lawyer-online .yo-questions .text-success b {
    font-size: 22px !important;
  }

  .questions-topic-filter {
    position: relative;
    padding-top: 1px;
  }

  .questions-topic-filter .row > .col-12 {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .questions-topic-filter a.btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    margin: 0 !important;
    padding: 8px 12px;
    white-space: normal;
    text-align: left;
  }

  .questions-topic-filter.urs-topics--collapsed .row {
    max-height: 250px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(#000 72%, transparent);
    mask-image: linear-gradient(#000 72%, transparent);
  }

  .questions-topic-filter.urs-topics--searching .row {
    max-height: none;
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
  }

  /* Contents for long pages */
  .urs-mobile-contents {
    width: calc(100% - 24px);
    margin: 20px auto 28px;
    border: 1px solid #c9d9e8;
    border-radius: 14px;
    background: #f7fbfe;
    overflow: hidden;
  }

  .urs-mobile-contents summary {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    color: #12324d;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
  }

  .urs-mobile-contents summary::after {
    content: "+";
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #e4f1fa;
    color: #0065b1;
    font-size: 24px;
  }

  .urs-mobile-contents[open] summary::after {
    content: "−";
  }

  .urs-mobile-contents ol {
    max-height: 55vh;
    margin: 0;
    padding: 0 16px 14px 40px;
    overflow: auto;
  }

  .urs-mobile-contents li {
    margin: 0;
  }

  .urs-mobile-contents a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid #dfeaf3;
    font-size: 15px;
    line-height: 1.35;
  }

  .urs-scroll-target {
    scroll-margin-top: 88px;
  }

  /* New service FAQ */
  .services-3-page #faq .urs-faq-vertical {
    display: block !important;
    transform: none !important;
    width: auto !important;
  }

  .services-3-page #faq .urs-faq-vertical details {
    width: 100% !important;
    display: block !important;
    margin: 0 0 10px !important;
    transform: none !important;
  }

  .services-3-page #faq .urs-faq-vertical summary {
    min-height: 54px;
    display: flex;
    align-items: center;
    padding: 14px 46px 14px 14px;
  }

  .services-3-page #faq .faq-swipe-dots,
  .services-3-page #faq .faq-pagination,
  .services-3-page #faq .block-loader {
    display: none !important;
  }

  /* Prices and sitemap */
  .urs-prices-search,
  .urs-sitemap-search {
    margin-top: 0;
  }

  .urs-page-prices #accordionPrices .accordion-button,
  .urs-page-sitemap #accordionFlushSitemap .accordion-button {
    min-height: 58px;
    padding: 12px 48px 12px 14px;
    font-size: 16px;
    line-height: 1.35;
  }

  .urs-page-prices #accordionPrices .accordion-body {
    padding: 8px 0 16px;
  }

  .urs-page-prices #accordionPrices table,
  .urs-page-prices #accordionPrices tbody,
  .urs-page-prices #accordionPrices tr,
  .urs-page-prices #accordionPrices td {
    display: block;
    width: 100% !important;
  }

  .urs-page-prices #accordionPrices tr {
    padding: 12px;
    border-bottom: 1px solid #e2e8ef !important;
  }

  .urs-page-prices #accordionPrices td {
    min-height: 0;
    padding: 3px 0 !important;
    background: transparent !important;
  }

  .urs-sitemap-count {
    min-width: 30px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: 10px;
    padding: 0 8px;
    border-radius: 999px;
    background: #e7f2fa;
    color: #0065b1;
    font-size: 13px;
    font-weight: 700;
  }

  .urs-page-sitemap #accordionFlushSitemap .accordion-body {
    padding: 8px 12px 18px;
  }

  .urs-page-sitemap #accordionFlushSitemap li > a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 6px 0;
  }

  /* Reviews */
  .urs-page-reviews .contents > .row > .col > p:first-child {
    font-size: 17px;
    line-height: 1.55;
  }

  .urs-page-reviews .thx > .row:nth-child(2) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
  }

  .urs-page-reviews .thx > .row:nth-child(2) > a {
    width: auto;
    margin: 0 !important;
    padding: 0;
    border: 1px solid #e0e7ee;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(29, 48, 66, .07);
  }

  .urs-page-reviews .thx .tk {
    min-height: 220px;
  }

  /* News */
  .urs-page-news .preview-article {
    margin-bottom: 18px !important;
    padding: 0 12px 16px;
    border: 1px solid #e1e8ef;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(32, 59, 84, .06);
    overflow: hidden;
  }

  .urs-page-news .preview-article .image {
    min-height: 128px;
    margin: 0 -12px 14px !important;
  }

  .urs-page-news .preview-article p {
    margin-bottom: 8px !important;
  }

  .urs-page-news .preview-article p a {
    min-height: 44px;
    display: -webkit-box;
    font-size: 16px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }

  .urs-page-news .preview-article time {
    font-size: 13px;
  }

  /* Practice */
  .urs-page-practice .practice_slider {
    margin-bottom: 18px;
    border: 1px solid #e1e8ef;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 7px 22px rgba(24, 46, 68, .07);
  }

  .urs-page-practice .practice .tem_block {
    padding: 18px 14px 0 !important;
  }

  .urs-page-practice .practice .tem_block .img_item {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 4px 0 16px;
  }

  .urs-page-practice .practice .tem_block .img_item img {
    width: auto;
    max-width: 72%;
    height: 235px;
    object-fit: contain;
  }

  .urs-page-practice .practice .tem_block .text_op h2 {
    font-size: 18px !important;
    line-height: 1.35;
    font-weight: 700;
  }

  .urs-page-practice .practice .tem_block .text_op p {
    font-size: 15px;
    line-height: 1.55;
  }

  .urs-practice-summary--collapsed p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    overflow: hidden;
  }

  .urs-practice-summary__toggle {
    min-height: 44px;
    padding: 7px 0;
    border: 0;
    background: transparent;
    color: #0065b1;
    font-weight: 700;
  }

  .urs-page-practice .practice .text_bottom p {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 8px;
    font-size: 14px !important;
    line-height: 1.4 !important;
  }

  .urs-page-practice .practice .text_bottom a {
    min-height: 48px;
    display: flex;
    align-items: center;
    margin-top: 14px !important;
    padding: 8px 0;
    font-size: 15px !important;
    line-height: 1.35 !important;
  }

  /* Contacts and company */
  .urs-page-contacts main > .container.mt-5,
  .urs-page-contacts .contents.mt-5 {
    margin-top: 24px !important;
  }

  .urs-page-contacts .contents img {
    max-width: 72px;
    max-height: 72px;
  }

  .urs-page-contacts .contents a[href^="tel:"],
  .urs-page-contacts .contents a[href^="mailto:"] {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .urs-page-contacts iframe[title*="Картах"] {
    height: 360px;
    background: linear-gradient(110deg, #eef3f7 8%, #f7f9fb 18%, #eef3f7 33%);
    background-size: 200% 100%;
  }

  .urs-page-company .contents p,
  .urs-page-company .contents li {
    font-size: 16px;
    line-height: 1.62;
  }

  .urs-page-company .staff-slider ._0 {
    border: 1px solid #e1e8ef;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 7px 22px rgba(26, 49, 70, .07);
  }

  .urs-page-company .staff-slider ._0 img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
  }

  /* Compact top spacing on short inner pages. */
  .urs-page-contacts main > .title,
  .urs-page-sitemap main > .title {
    margin-bottom: 0;
  }

  .urs-page-sitemap .contents.mt-5 {
    margin-top: 24px !important;
  }

  /* Legacy online badges are positioned against the body and could add
     up to 10 px of horizontal scroll on very narrow phones. */
  .badge.bg-success.blink {
    right: 12px !important;
    left: auto !important;
  }
}
