/* [Модальное окно] */

.janela-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, .55);
  overflow: auto;
  z-index: 90;
  transition: opacity .3s ease, visibility .3s ease;
  opacity: 0;
  visibility: hidden;
  cursor: pointer;
  box-sizing: border-box;
}

.janela-overlay *, .janela-overlay *::before, .janela-overlay *::after {
  box-sizing: inherit;
}

.janela-overlay_visible {
  opacity: 1;
  visibility: visible;
}

.janela-table {
  display: table;
  width: 100%;
  min-height: 100%;
}

.janela-table-cell {
  display: table-cell;
  vertical-align: middle;
  text-align: center;
  padding: 20px 15px;
}

.janela {
  display: inline-block;
  padding: 40px 36px 28px;
  max-width: 440px;
  width: 100%;
  background: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .18);
  color: #1f2937;
  text-align: left;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  border-radius: 12px;
  cursor: auto;
  position: relative;
  transform: translateY(24px);
  transition: transform .35s cubic-bezier(.22,.68,0,1.2);
}

.janela-overlay_visible .janela {
  transform: translateY(0);
}

/* Заголовок */
.janela__header {
  font-family: 'Charis SIL', serif;
  font-size: 24px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 6px;
  padding-right: 20px; /* не перекрываться с крестиком */
}

/* Название тура — вместо disabled input */
.janela__tour-name {
  font-size: 14px;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 16px;
  margin-bottom: 20px;
}

/* Кнопка закрытия */
.janela__close {
  position: absolute;
  right: 14px;
  top: 14px;
  background: #ef4444;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background .2s;
  flex-shrink: 0;
}

.janela__close:hover { background: #dc2626; }

.janela__close::before,
.janela__close::after {
  content: "";
  display: block;
  width: 14px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  position: absolute;
  top: 50%; left: 50%;
}

.janela__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.janela__close::after  { transform: translate(-50%, -50%) rotate(-45deg); }

/* Поля формы */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 5px;
  
}

.form-control {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  color: #111827;
  background: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  font-family: inherit;
  resize: none;
}

.form-control::placeholder { color: #9ca3af; }

.form-control:focus {
  border: 2px solid #e79e6d;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .15);
  background: #fff;
}

.form-control.is-valid {
  border-color: #22c55e;
  background: #f0fdf4;
}

.form-control.is-invalid {
  border-color: #ef4444;
  background: #fef2f2;
}

/* Дата */
.form-date-wrapper {
  position: relative;
}

.form-date-wrapper .form-control {
  appearance: none;
  cursor: pointer;
}

/* Чекбокс */
.form-checkbox {
  display: flex;
  align-items: flex-start;
  margin-bottom: 16px;
  position: relative;
}

.form-checkbox__input {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.form-checkbox__label {
  position: relative;
  min-height: 20px;
  padding-left: 28px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  line-height: 1.4;
}

.form-checkbox__label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 18px;
  border: 1.5px solid #9ca3af;
  border-radius: 4px;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}

.form-checkbox__label::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #2e2c2b;
  border-width: 0 2px 2px 0;
  opacity: 0;
  transform: rotate(45deg) scale(.75);
  transition: opacity .15s ease, transform .15s ease;
}

.form-checkbox__input:checked + .form-checkbox__label::before {
  border-color: #e79e6d;
  background: #fff;
}

.form-checkbox__input:checked + .form-checkbox__label::after {
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

.form-checkbox__input:hover + .form-checkbox__label::before {
  border-color: #e79e6d;
}

.form-checkbox__input:focus-visible + .form-checkbox__label::before {
  box-shadow: 0 0 0 3px rgba(251, 205, 175, .75);
}

/* Кнопки */
.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
}

.btn {
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background .2s, opacity .2s;
  font-family: inherit;
}

.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.formSubmit:disabled {
  pointer-events: none;
}

.formSubmit.is-sending {
  opacity: 1;
  color: #2e2c2b;
  background-image: linear-gradient(90deg, #e79e6d 0%, #e79e6d 50%, #fbcdaf 50%, #fbcdaf 100%);
  background-size: 200% 100%;
  animation: formSubmitProgress 5s linear forwards;
}

@keyframes formSubmitProgress {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: 0 0;
  }
}

.btn-primary {
  background: #fbcdaf;
  color: #2e2c2b;
}

.btn-primary:hover:not(:disabled) { background: #e79e6d; }

.btn-secondary {
  background: #fff;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover { background: #f3f4f6; }

.form-consent-popover {
  flex-basis: 100%;
  max-width: 100%;
  margin-top: 0;
  padding: 0 12px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  border: 1px solid #fbcdaf;
  border-radius: 8px;
  background: #fff7ed;
  color: #7c2d12;
  box-shadow: 0 8px 20px rgba(124, 45, 18, .12);
  font-size: 13px;
  line-height: 1.4;
  transition: opacity .2s ease, transform .2s ease, max-height .2s ease, padding .2s ease, margin .2s ease;
}

.form-consent-popover_visible {
  margin-top: 2px;
  padding: 9px 12px;
  max-height: 80px;
  opacity: 1;
  transform: translateY(0);
}

.form-checkbox_attention .form-checkbox__label::before {
  box-shadow: 0 0 0 3px rgba(251, 205, 175, .75);
}

/* Алерты */
.alert {
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 12px;
}

.alert:empty { display: none; }

.alert-danger {
  padding: 10px 14px;
  background: #fee2e2;
  color: #b91c1c;
}

.alert-success {
  padding: 10px 14px;
  background: #dcfce7;
  color: #166534;
}

.form-hint {
  position: relative;
  padding-right: 26px; /* место под крестик */
  font-size: 12px;
  color: #6b7280;
  margin: 5px 0 0;
  padding: 7px 10px;
  background: #e8f0eb;
  border-left: 3px solid #004d30;
  border-radius: 0 6px 6px 0;
  line-height: 1.4;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity .3s ease, max-height .3s ease;
}

.form-hint.form-hint_visible {
  opacity: 1;
  max-height: 60px;
}

.form-hint__close {
  position: absolute;
  right: 6px;
  top: 25%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
  transition: color .2s;
}

.form-hint__close:hover {
  color: #374151;
}

/* ─── SKELETON PRELOADER ──────────────────────────── */

  /* Shimmer keyframe */
  @keyframes shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position:  600px 0; }
  }

  .sk {
    background: linear-gradient(90deg,
      #e8e3da 25%,
      #f0ece4 50%,
      #e8e3da 75%
    );
    background-size: 600px 100%;
    animation: shimmer 1.4s infinite linear;
    border-radius: 6px;
  }

  /* Overlay — перекрывает страницу поверх реального контента */
  #page-skeleton {
    position: fixed;
    inset: 0;
    background: var(--ivory);
    z-index: 9999;
    overflow-y: auto;
    padding: 32px 16px;
    opacity: 1;
    transition: opacity 0.4s ease;
  }

  #page-skeleton.sk-fade-out {
    opacity: 0;
    pointer-events: none;
  }

  /* Внутренний wrapper совпадает с .page-wrapper */
  .sk-wrapper {
    max-width: 1280px;
    margin: 0 auto;
  }

  /* Двухколоночная сетка как .product-layout */
  .sk-layout {
    display: grid;
    grid-template-columns: 55% 1fr;
    gap: 48px;
    align-items: start;
  }

  /* ─── LEFT: Desktop gallery ─── */
  .sk-gallery {
    display: flex;
    gap: 12px;
  }

  .sk-thumbs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
  }

  .sk-thumb {
    width: 72px;
    height: 72px;
    border-radius: 12px;
  }

  .sk-main-img {
    flex: 1;
    aspect-ratio: 4/5;
    border-radius: 20px;
  }

  /* ─── LEFT: Mobile gallery ─── */
  .sk-gallery-mobile {
    display: none;
    flex-direction: column;
    gap: 12px;
  }

  .sk-mobile-img {
    width: 100%;
    aspect-ratio: 4/5;
    border-radius: 20px;
  }

  .sk-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
  }

  .sk-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
  }

  /* ─── RIGHT: Info column ─── */
  .sk-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 4px;
  }

  .sk-badge {
    width: 80px;
    height: 26px;
    border-radius: 8px;
  }

  .sk-title-1 {
    width: 90%;
    height: 42px;
    border-radius: 8px;
  }

  .sk-title-2 {
    width: 65%;
    height: 42px;
    border-radius: 8px;
    margin-top: -12px;
  }

  .sk-social {
    display: flex;
    gap: 16px;
    align-items: center;
  }

  .sk-social-item {
    width: 150px;
    height: 18px;
    border-radius: 6px;
  }

  .sk-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .sk-spec-card {
    height: 60px;
    border-radius: 12px;
  }

  .sk-desc-1 { width: 100%; height: 14px; border-radius: 6px; }
  .sk-desc-2 { width: 100%; height: 14px; border-radius: 6px; margin-top: 8px; }
  .sk-desc-3 { width: 75%;  height: 14px; border-radius: 6px; margin-top: 8px; }

  .sk-sep {
    width: 100%;
    height: 1px;
    background: #e8e3da;
  }

  .sk-pricing-label {
    width: 160px;
    height: 12px;
    border-radius: 4px;
    margin-bottom: 14px;
  }

  .sk-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .sk-price-card {
    height: 90px;
    border-radius: 16px;
  }

  .sk-benefit {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .sk-benefit-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .sk-benefit-text {
    height: 14px;
    border-radius: 6px;
    flex: 1;
  }

  .sk-cta {
    height: 56px;
    border-radius: 16px;
  }

  .sk-guarantees {
    display: flex;
    gap: 16px;
  }

  .sk-guarantee {
    width: 160px;
    height: 18px;
    border-radius: 6px;
  }

  /* ─── Responsive: skeleton ─── */
  @media (max-width: 900px) {
    .sk-layout {
      grid-template-columns: 1fr;
      gap: 28px;
    }
    .sk-gallery        { display: none; }
    .sk-gallery-mobile { display: flex; }
  }

  @media (max-width: 480px) {
    #page-skeleton     { padding: 16px 12px; }
    .sk-cards          { grid-template-columns: 1fr; gap: 14px; }
    .sk-guarantees     { flex-direction: column; gap: 10px; }
  }
