/*
Theme Name: WP Mechanic 2.0
Theme URI: https://web-mechanic.ru
Author: Анисимов П. О.
Author URI: https://web-mechanic.ru
Description: Создание, поддержка и хостинг сайтов на WordPress и других CMS. Второе поколение темы со строгим техническим дизайном, личным кабинетом клиента, интерактивной каруселью портфолио и калькулятором заказа парсинга.
Version: 2.0.1
Requires at least: 5.9
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wp-mechanic
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, full-site-editing
*/

:root {
  --color-paper: #fafaf9;
  --color-fog: #f3f4f2;
  --color-line: #e7e9e5;
  --color-ink: #0e1517;
  --color-ink-soft: #1b262a;
  --color-steel: #5b6568;
  --color-mint: #22c55e;
  --color-mint-dark: #16a34a;
  --color-mint-light: #e7f8ee;
  --color-amberx: #f59e0b;
}

body {
  font-family: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--color-paper);
  color: var(--color-ink);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-display {
  font-family: 'Unbounded', -apple-system, BlinkMacSystemFont, sans-serif;
}

.font-mono-data {
  font-family: 'JetBrains Mono', monospace;
}

/* Background utilities */
.bg-paper { background-color: #fafaf9; }
.bg-fog { background-color: #f3f4f2; }
.bg-line { background-color: #e7e9e5; }
.bg-ink { background-color: #0e1517; }
.bg-ink-soft { background-color: #1b262a; }
.bg-mint { background-color: #22c55e; }
.bg-mint-dark { background-color: #16a34a; }
.bg-mint-light { background-color: #e7f8ee; }

/* Text color utilities */
.text-ink { color: #0e1517; }
.text-steel { color: #5b6568; }
.text-mint { color: #22c55e; }
.text-mint-dark { color: #16a34a; }
.text-amberx { color: #f59e0b; }

/* Border color utilities */
.border-line { border-color: #e7e9e5; }
.border-fog { border-color: #f3f4f2; }
.border-ink { border-color: #0e1517; }
.border-mint { border-color: #22c55e; }

/* Marquee Animation */
@keyframes marquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

.animate-marquee {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
}

.animate-marquee:hover {
  animation-play-state: paused;
}

/* Pulse Dot Animation */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.animate-pulse-dot {
  animation: pulse-dot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Carousel Styles */
.cases-carousel-container {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}

.cases-carousel-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.cases-carousel-slide {
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .cases-carousel-slide {
    width: 50%;
  }
}

@media (min-width: 1024px) {
  .cases-carousel-slide {
    width: 33.333333%;
  }
}

/* Dots Window */
.cases-carousel-dots-window {
  mask-image: linear-gradient(to right, transparent 0%, black 20%, black 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 20%, black 80%, transparent 100%);
}

/* Data Table Scroll Styling */
.preview-table-scroll::-webkit-scrollbar {
  height: 8px;
}
.preview-table-scroll::-webkit-scrollbar-track {
  background: #f3f4f2;
  border-radius: 4px;
}
.preview-table-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.preview-table-scroll::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.data-preview-blur {
  filter: blur(4.5px);
  -webkit-filter: blur(4.5px);
  user-select: none;
  -webkit-user-select: none;
  opacity: 0.6;
  display: inline-block;
}

/* 5. Custom Checkboxes: Light background, green checkmark */
input[type="checkbox"],
.region-checkbox,
.theme-checkbox {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 0.375rem;
  border: 1.5px solid #d1d5db;
  background-color: #ffffff;
  display: inline-grid;
  place-content: center;
  cursor: pointer;
  vertical-align: middle;
  transition: all 150ms ease-in-out;
  position: relative;
  outline: none;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(14, 21, 23, 0.04);
}

input[type="checkbox"]:hover,
.region-checkbox:hover,
.theme-checkbox:hover {
  border-color: #22c55e;
  background-color: #f3f4f2;
}

input[type="checkbox"]:focus-visible,
.region-checkbox:focus-visible,
.theme-checkbox:focus-visible {
  border-color: #16a34a;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

input[type="checkbox"]:checked,
.region-checkbox:checked,
.theme-checkbox:checked {
  background-color: #e7f8ee;
  border-color: #22c55e;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='none' stroke='%2316a34a' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 72% 72%;
}

input[type="checkbox"]:active,
.region-checkbox:active,
.theme-checkbox:active {
  transform: scale(0.93);
}

/* Region checkbox label item highlight */
.region-checkbox-label {
  user-select: none;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.region-checkbox-label:hover {
  background-color: rgba(14, 21, 23, 0.03);
}

.region-checkbox-label.is-checked {
  background-color: rgba(231, 248, 238, 0.6);
}

/* Full-width Coverflow Carousel Slides */
.cases-carousel-track {
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.case-study-slide {
  transition: transform 650ms cubic-bezier(0.16, 1, 0.3, 1),
              opacity 650ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Ultra-smooth infinite marquee animation without jitter */
.wm-marquee-container {
  display: flex;
  overflow: hidden;
  user-select: none;
  width: 100%;
}

.wm-marquee-group {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  min-width: 100%;
  animation: wm-marquee-scroll 35s linear infinite;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

@keyframes wm-marquee-scroll {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-100%, 0, 0);
  }
}

.wm-marquee-container:hover .wm-marquee-group {
  animation-play-state: paused;
}

@keyframes case-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.animate-case-bounce {
  animation: case-bounce 1.8s ease-in-out infinite;
}

/* Custom Parsing: Silky smooth animated expand/collapse transition for Estimated Price Block */
.estimated-price-container {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: grid-template-rows 550ms cubic-bezier(0.25, 1, 0.5, 1),
              opacity 450ms cubic-bezier(0.25, 1, 0.5, 1),
              margin 550ms cubic-bezier(0.25, 1, 0.5, 1),
              visibility 550ms;
  margin-top: 0;
  margin-bottom: 0;
}

.estimated-price-container.expanded {
  grid-template-rows: 1fr;
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
}

.estimated-price-inner {
  overflow: hidden;
  min-height: 0;
  transform: translateY(-8px) scale(0.985);
  opacity: 0;
  transition: transform 550ms cubic-bezier(0.25, 1, 0.5, 1),
              opacity 450ms cubic-bezier(0.25, 1, 0.5, 1);
}

.estimated-price-container.expanded .estimated-price-inner {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Smooth number/title change transition */
#order-estimated-price-title {
  display: inline-flex;
  align-items: baseline;
  gap: 0.375rem;
  transition: opacity 150ms cubic-bezier(0.25, 1, 0.5, 1),
              transform 150ms cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity, transform;
}

#order-estimated-price-title.price-changing {
  opacity: 0.15;
  transform: translateY(-3px) scale(0.98);
}
