/* ===================================================
   FORMS UI — Progress bar, Spinner, Validation, Toast
   Не змінює існуючий дизайн — тільки додає нові елементи
   =================================================== */

/* ---- Upload Progress Bar ---- */
.upload-progress-wrap {
  display: none;
  width: 100%;
  margin: 8px 0 4px;
}
.upload-progress-wrap.is-visible {
  display: block;
}
.upload-progress-bar {
  height: 5px;
  width: 100%;
  background: rgba(255,255,255,0.15);
  border-radius: 99px;
  overflow: hidden;
}
.upload-progress-bar__fill {
  height: 100%;
  width: 0%;
  background: #dc2626;
  border-radius: 99px;
  transition: width 0.2s ease;
}
.upload-progress-label {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-top: 3px;
}

/* ---- Spinner inside button ---- */
.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
  flex-shrink: 0;
}
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

button[disabled] {
  opacity: 0.7;
  cursor: not-allowed !important;
  pointer-events: none;
}

/* ---- Inline field validation messages ---- */
.field-error {
  display: none;
  font-size: 12px;
  color: #ff6b6b;
  margin-top: 4px;
  padding-left: 2px;
}
.field-error.is-visible {
  display: block;
}

.form-field-wrap {
  position: relative;
}

/* Shake animation on invalid submit */
@keyframes field-shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}
.field-invalid {
  animation: field-shake 0.35s ease;
  border-color: #ff6b6b !important;
  outline: none;
}

/* ---- Toast notification ---- */
#toast-container {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  width: min(90vw, 420px);
}

.toast {
  width: 100%;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  box-shadow: 0 6px 28px rgba(0,0,0,0.35);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(20px) scale(0.97);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast.toast--show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.toast.toast--hide {
  opacity: 0;
  transform: translateY(10px) scale(0.97);
}
.toast--success {
  background: #1a7a4a;
  border-left: 4px solid #22c55e;
}
.toast--error {
  background: #7a1a1a;
  border-left: 4px solid #dc2626;
}
.toast__icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}
.toast__body {
  flex: 1;
}
.toast__title {
  font-weight: 700;
  margin-bottom: 2px;
}
.toast__msg {
  font-weight: 400;
  opacity: 0.88;
  font-size: 13px;
}

/* ---- Google Reviews Section ---- */
.google-reviews-section {
  padding: 60px 0;
}
.google-reviews-section .reviews-section__title {
  text-align: center;
  margin-bottom: 32px;
}
.google-reviews__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .google-reviews__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 500px) {
  .google-reviews__grid {
    grid-template-columns: 1fr;
  }
}

.google-review-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.google-review-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.google-review-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #333;
}
.google-review-card__name {
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  margin-bottom: 2px;
}
.google-review-card__date {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}
.google-review-card__stars {
  display: flex;
  gap: 2px;
}
.google-review-card__star {
  color: #facc15;
  font-size: 15px;
}
.google-review-card__text {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
  flex: 1;
}
.google-review-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  margin-top: auto;
}
.google-review-card__badge svg {
  width: 14px;
  height: 14px;
}

.google-reviews__loading,
.google-reviews__error {
  text-align: center;
  color: rgba(255,255,255,0.5);
  padding: 40px 0;
  font-size: 14px;
}
.google-reviews__see-all {
  text-align: center;
  margin-top: 28px;
}
.google-reviews__see-all a {
  color: #dc2626;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(220,38,38,0.4);
  padding-bottom: 2px;
  transition: border-color 0.2s;
}
.google-reviews__see-all a:hover {
  border-color: #dc2626;
}
