/*
Theme Name: In-scale
Theme URI: https://graststudio.ru
Author: Grast Studio
Author URI: https://graststudio.ru 
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: grast
*/

/* 
 * This is the main style file for WordPress theme identification.
 * The actual styles are loaded from the assets directory.
 */


/* Стили для ленивой загрузки */
.swiper-lazy {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.swiper-lazy-loaded {
  opacity: 1;
}

.swiper-lazy-preloader {
  transition: opacity 0.3s ease-in-out;
}

.grecaptcha-badge {
  display: none !important;
}

.no-posts-found,
.no-content-placeholder {
  padding: 20px;
}

.hidden {
  display: none;
}

.search-result__empty {
  text-align: center;
  font-size: 14px;
  padding: 10px;
}

.hidden-sort {
  display: none;
}

.load-posts {
  position: relative;
}

.sub-modal-list.load-posts::before,
.sub-modal-list.load-posts::after {
  margin-top: 10px;
}

.load-posts::before,
.load-posts::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 0;
  right: 0;
  /* bottom: 0; */
  margin-left: auto;
  margin-right: auto;
  /* margin-bottom: -40px; */
  background-color: var(--font-blue);
  opacity: 0.6;
  z-index: 20000;
  border-radius: 50%;
  animation: posts-spinner 2.0s infinite ease-in-out;
  top: 0;
  margin-top: 20px;

}

.load-posts::before {
  animation-delay: -1.0s;
}


@keyframes posts-spinner {

  0%,
  100% {
    transform: scale(0.0);
  }

  50% {
    transform: scale(1.0);
  }
}


/* .border-red { 
  border: 3px solid red !important; 
  position: relative;
}
.border-red::after {
  content: "Просмотрено";
  position: absolute;
  top: 0;
  right: 0;
  background: red;
  color: white;
  padding: 3px 6px;
  font-size: 12px;
  z-index: 10;
} */

[data-template="recommend-post"] {
  min-height: 800px;
}

.highlighted-comment {
  animation: highlight-fade 3s ease-out;
  border-radius: 4px;
}

@keyframes highlight-fade {
  0% {
    background-color: rgba(255, 223, 126, 0.1);
    box-shadow: 0 0 10px rgba(255, 223, 126, 0.3);
  }

  70% {
    background-color: rgba(255, 223, 126, 0.1);
    box-shadow: 0 0 10px rgba(255, 223, 126, 0.3);
  }

  100% {
    background-color: transparent;
    box-shadow: none;
  }
}

.grecaptcha-badge {
  display: none !important;
}

/* =====================================================================
   Cross-fade переходы между страницами фронта (View Transitions API).
   Chrome 126+, Edge 126+, Safari 18.2+. Браузеры без поддержки молча
   игнорируют правило.
   Защиты:
   - @media prefers-reduced-motion: no-preference → уважаем системную
     настройку «уменьшить анимации»;
   - iOS Safari отключён через @supports (-webkit-touch-callout: none) —
     известны проблемы с тяжёлым рендером длинных статей;
   - длительность 150ms вместо дефолтных ~250ms — меньше шанс заметить
     mismatch при смене темы / lazy-load рекламы.
   ===================================================================== */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }

  @supports (-webkit-touch-callout: none) {
    @view-transition {
      navigation: none;
    }
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 150ms;
  }
}