/* Кнопка «Пригласить мастера» */

.btn-wrapper {
  text-align: center;
  margin: 0 0 40px;
}

.invite-master-btn {
  background-color: #FDA12B;
  color: #fff;
  border: none;
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
  padding-right: 3rem !important;
  padding-left: 3rem !important;
  font-size: 16px;
  border-radius: 0px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-weight: 500;
}

.invite-master-btn:hover {
  background-color: #E68A19;
  color: #fff;
}

/* Затемнённый фон — z-index выше, чем у галереи */
.fm-overlay {
  display: none !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.6) !important;
  z-index: 100001 !important;
  justify-content: center !important;
  align-items: center !important;
}

.fm-overlay.active {
  display: flex !important;
}

/* Окно формы — гибкая высота вместо фиксированной */
.fm-content {
  background: #f5f3ef !important;
  padding: 26px 28px 24px !important;       /* было 30px 28px — чуть уменьшен верх/низ */
  width: 370px !important;
  min-height: 580px !important;             /* было height: 630px — заменено на min-height */
  max-height: 90vh !important;             /* ограничение по высоте экрана */
  box-sizing: border-box !important;
  border-radius: 8px !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
  color: #333 !important;
  z-index: 100002 !important;
  overflow-y: auto !important;             /* прокрутка при переполнении */
}

/* Крестик */
.fm-close {
  position: absolute !important;
  top: 14px !important;
  right: 16px !important;
  font-size: 24px !important;
  cursor: pointer !important;
  color: #999 !important;
  line-height: 1 !important;
  z-index: 100003 !important;
}

.fm-close:hover {
  color: #333 !important;
}

/* Заголовок */
.fm-content h3 {
  margin: 0 0 8px 0 !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  text-align: center !important;
  color: #333 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

.fm-hint {
  font-size: 13px !important;
  color: #777 !important;
  margin: 0 0 16px 0 !important;            /* было 20px — уменьшено */
  line-height: 1.4 !important;
  text-align: center !important;
}

/* Поля */
.fm-group {
  margin-bottom: 10px !important;           /* было 14px — уменьшено */
}

.fm-group label {
  display: block !important;
  margin-bottom: 4px !important;            /* было 5px — уменьшено */
  font-weight: 500 !important;
  font-size: 14px !important;
  color: #333 !important;
}

.fm-required {
  color: #d32f2f !important;
}

.fm-group input,
.fm-group textarea {
  width: 100% !important;
  padding: 9px 12px !important;             /* было 10px — чуть уменьшено */
  border: 1px solid #ccc !important;
  border-radius: 4px !important;
  box-sizing: border-box !important;
  font-size: 14px !important;
  background: #fff !important;
  color: #333 !important;
  font-family: inherit !important;
}

.fm-group input:focus,
.fm-group textarea:focus {
  outline: none !important;
  border-color: #999 !important;
}

.fm-group textarea {
  resize: vertical !important;
  min-height: 60px !important;
  max-height: 120px !important;             /* ограничение высоты textarea */
}

/* Чекбокс */
.fm-checkbox {
  margin: 14px 0 14px !important;           /* было 18px 0 16px — уменьшено */
  font-size: 12px !important;
  line-height: 1.5 !important;
  color: #555 !important;
  display: flex !important;
  align-items: flex-start !important;
}

.fm-checkbox input {
  margin-right: 8px !important;
  margin-top: 2px !important;
  flex-shrink: 0 !important;
  accent-color: #d32f2f !important;
}

.fm-checkbox a {
  color: #d32f2f !important;
  text-decoration: underline !important;
}

/* Кнопка отправки формы */
.fm-submit {
  width: 100%;
  background-color: #FDA12B;
  color: #fff;
  border: none;
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
  padding-right: 3rem !important;
  padding-left: 3rem !important;
  font-size: 16px;
  border-radius: 0px;
  cursor: pointer;
  margin-top: auto;                          /* прижимает к низу при свободном месте */
  flex-shrink: 0 !important;                /* кнопка не сжимается */
  font-family: inherit;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.fm-submit:hover {
  background-color: #E68A19;
  color: #fff;
}

/* ====== Cookie-виджет ====== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 16px 24px;
  background: #2c3e50;
  color: #fff;
  font-size: 14px;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.3);
  transform: translateY(100%);
  transition: transform 0.4s ease;
  flex-wrap: wrap;
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-text {
  max-width: 800px;
  line-height: 1.5;
}

.cookie-link {
  color: #fff;
  text-decoration: underline;
}

.cookie-link:hover {
  color: #ccc;
}

.cookie-btn {
  background: #fff;
  color: #2c3e50;
  border: none;
  padding: 10px 28px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.1s;
}

.cookie-btn:hover {
  background: #f0f0f0;
}

.cookie-btn:active {
  transform: scale(0.97);
}

@media (max-width: 576px) {
  .cookie-banner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
    padding: 14px 16px;
  }
}
