/* Auth + review modals (field pages do not load new-styles.css) */

.auth-modal,
.review-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.auth-modal[aria-hidden="false"],
.review-modal[aria-hidden="false"] {
  display: flex;
  opacity: 1;
  visibility: visible;
}

.auth-modal-backdrop,
.review-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.auth-modal-container,
.review-modal-container {
  position: relative;
  background: var(--white);
  border-radius: 20px;
  width: calc(100% - 32px);
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95);
  transition: transform 0.3s;
}

.review-modal-container {
  max-width: 600px;
}

.auth-modal[aria-hidden="false"] .auth-modal-container,
.review-modal[aria-hidden="false"] .review-modal-container {
  transform: scale(1);
}

.auth-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--grey-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--grey-700);
  z-index: 2;
}

.auth-modal-content {
  padding: 40px 32px 32px;
}

.review-modal-content {
  padding: 32px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo img {
  width: 96px;
  max-width: 96px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.auth-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--grey-900);
  text-align: center;
  margin: 0 0 8px;
}

.auth-subtitle {
  font-size: 15px;
  color: var(--grey-600);
  text-align: center;
  margin: 0 0 32px;
  line-height: 1.5;
}

.auth-social-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.auth-btn {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: inherit;
  box-sizing: border-box;
}

.auth-btn-apple {
  background: #000;
  color: #fff;
}

.auth-btn-google {
  background: #fff;
  color: #1f1f1f;
  border: 1px solid var(--grey-300);
}

.auth-btn-primary {
  background: var(--spruce-green);
  color: var(--white);
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  color: var(--grey-500);
  font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--grey-300);
}

.auth-divider span {
  padding: 0 16px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-form-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--grey-900);
}

.auth-form-group input {
  padding: 12px 16px;
  border: 1px solid var(--grey-300);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  box-sizing: border-box;
  width: 100%;
}

.auth-form-group small {
  font-size: 12px;
  color: var(--grey-500);
}

.auth-error {
  padding: 12px 16px;
  background: #fee;
  border: 1px solid #fcc;
  border-radius: 8px;
  color: #c33;
  font-size: 14px;
}

.auth-switch {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--grey-600);
}

.auth-link {
  background: none;
  border: none;
  color: var(--spruce-green);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}

.review-modal-header {
  margin-bottom: 24px;
}

.review-modal-header h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px;
}

.review-modal-header p {
  font-size: 14px;
  color: var(--grey-600);
  margin: 0;
}

.review-rating-input {
  margin-bottom: 24px;
}

.review-rating-input label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.review-stars {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.review-star {
  font-size: 32px;
  color: var(--grey-300);
  cursor: pointer;
  line-height: 1;
}

.review-star.active {
  color: #ffd700;
}

.review-rating-text {
  text-align: center;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--spruce-green);
}

.review-text-input {
  margin-bottom: 24px;
}

.review-text-input label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.review-text-input textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 16px;
  border: 1px solid var(--grey-300);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}

.review-photos {
  margin-bottom: 24px;
}

.review-photos label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.review-photo-upload {
  border: 2px dashed var(--grey-300);
  border-radius: 10px;
  padding: 24px;
  cursor: pointer;
}

.review-photo-upload input[type="file"] {
  display: none;
}

.review-photo-preview {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

@media (max-width: 768px) {
  .auth-modal-content,
  .review-modal-content {
    padding: 24px 20px;
  }
}
