/* ===== Review feature — shared styles for orders.html & detail_1.html ===== */

/* Inline "Write a review" button (used in order rows + reviews header) */
.review-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.82rem;
  font-weight: 600;
  color: #3d348b !important;
  background: #fff;
  border: 1.5px solid #3d348b;
  border-radius: 100px;
  padding: 7px 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.review-btn:hover {
  background: #3d348b;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(61,52,139,0.18);
}
.review-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Modal overlay */
.review-modal {
  position: fixed;
  inset: 0;
  background: rgba(25,23,22,0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  z-index: 10002;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.review-modal.open {
  display: flex;
  opacity: 1;
}
.review-modal__card {
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
}
.review-modal.open .review-modal__card {
  transform: translateY(0) scale(1);
}
.review-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f6f7f4;
  color: #5a5654;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 1;
}
.review-modal__close:hover { background: #e0e2db; color: #191716; }

.review-modal__head {
  padding: 32px 36px 8px;
}
.review-modal__title {
  font-family: 'Playfair Display', serif !important;
  font-size: 1.4rem;
  font-weight: 600;
  color: #191716;
  margin-bottom: 6px !important;
}
.review-modal__product {
  font-family: 'Roboto Mono', monospace !important;
  font-size: 0.85rem;
  color: #5a5654;
  background: #f6f7f4;
  padding: 6px 14px;
  border-radius: 8px;
  display: inline-block;
  margin-top: 4px;
}

.review-modal__body {
  padding: 16px 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.review-field { display: flex; flex-direction: column; gap: 6px; }
.review-field__label {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.82rem;
  font-weight: 600;
  color: #191716;
}
.review-field__input,
.review-field__textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1.5px solid #e0e2db;
  background: #f6f7f4;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.9rem;
  color: #191716;
  outline: none;
  transition: all 0.3s ease;
  resize: vertical;
}
.review-field__textarea { min-height: 110px; }
.review-field__input::placeholder,
.review-field__textarea::placeholder { color: #beb7a4; }
.review-field__input:focus,
.review-field__textarea:focus {
  border-color: #3d348b;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(61,52,139,0.08);
}

/* Star rating */
.review-stars {
  display: flex;
  gap: 6px;
  align-items: center;
}
.review-stars__btn {
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
  color: #e0e2db;
  transition: transform 0.15s ease, color 0.15s ease;
}
.review-stars__btn:hover { transform: scale(1.15); }
.review-stars__btn.active { color: #e6af2e; }
.review-stars__hint {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.78rem;
  color: #beb7a4;
  margin-left: 8px;
}

.review-error {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.82rem;
  color: #ef4444;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 10px;
  padding: 10px 14px;
  display: none;
}
.review-error.show { display: block; }

.review-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 28px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  background: #e6af2e;
  color: #191716;
  box-shadow: 0 4px 15px rgba(230,175,46,0.3);
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  margin-top: 4px;
}
.review-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(230,175,46,0.4); background: #f0c85e; }
.review-submit:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

/* Success state */
.review-success {
  text-align: center;
  padding: 16px 0 8px;
}
.review-success__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(34,197,94,0.12);
  color: #22c55e;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px !important;
}
.review-success__title {
  font-family: 'Playfair Display', serif !important;
  font-size: 1.3rem;
  font-weight: 600;
  color: #191716;
  margin-bottom: 8px !important;
}
.review-success__text {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.9rem;
  color: #5a5654;
  line-height: 1.6;
  margin-bottom: 20px !important;
}

/* Toast for "verified buyers only" */
.review-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #191716;
  color: #fff;
  padding: 14px 24px;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  z-index: 10003;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  max-width: 92vw;
}
.review-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.review-toast__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #e6af2e;
}

@media (max-width: 480px) {
  .review-modal__head, .review-modal__body { padding-left: 22px; padding-right: 22px; }
}
