
input[type="text"]:focus-visible,
input[type="tel"]:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring);
}

/* Ghost button (back to rating) */
.link-btn {
  display: block;
  margin: 14px auto 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: underline;
}

.link-btn:hover {
  color: var(--primary-dark);
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Small screens */
@media (max-width: 480px) {
  .card {
    padding: 26px 20px;
    border-radius: 16px;
  }

  h1 {
    font-size: 1.25rem;
  }

  .star {
    font-size: 1.9rem;
  }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/*
  Physiorelive Feedback app styles.
  Brand colors match the app's design system.
*/

:root {
  --primary: #2f7d72;
  --primary-dark: #205d56;
  --secondary: #f2c94c;
  --bg: #f8fafc;
  --text: #1e293b;
  --text-muted: #64748b;
  --white: #ffffff;
  --border: #e2e8f0;
  --info-bg: #eff6ff;
  --info-text: #1d4ed8;
  --info-border: #bfdbfe;
  --error-bg: #fef2f2;
  --error-text: #b91c1c;
  --error-border: #fecaca;
  --ring: rgba(47, 125, 114, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Center the card on screen */
.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.card {
  width: 100%;
  max-width: 520px;
  background: var(--white);
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

/* Brand header */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand-name {
  margin: 0;
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary-dark);
}

.brand-subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

h1 {
  margin: 0 0 8px;
  font-size: 1.45rem;
}

.intro {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Star rating */
.rating-section {
  margin-bottom: 22px;
}

.label {
  margin: 0 0 10px;
  font-weight: 600;
}

.stars {
  display: flex;
  gap: 4px;
}

.star {
  background: none;
  border: none;
  padding: 4px 6px;
  font-size: 2.1rem;
  line-height: 1;
  color: #cbd5e1;
  cursor: pointer;
  transition: transform 0.15s ease, color 0.15s ease;
}

.star:hover {
  transform: scale(1.2);
}

.star.active {
  color: var(--secondary);
}

.star:focus-visible {
  outline: 3px solid rgba(47, 125, 114, 0.35);
  outline-offset: 2px;
  border-radius: 6px;
}

.helper-text {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Written feedback */
.field {
  display: block;
  margin-bottom: 26px;
}

.field span {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

input[type="text"],
input[type="tel"] {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

input[type="text"]:focus,
input[type="tel"]:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px var(--ring);
}

textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}

textarea:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 125, 114, 0.15);
}

.clinic-section {
  margin-bottom: 22px;
}

.clinic-options {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.clinic-btn {
  width: 100%;
  padding: 14px 24px;
  border: 1px solid var(--primary);
  border-radius: 12px;
  background: var(--white);
  color: var(--primary-dark);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.clinic-btn:hover {
  background: var(--primary);
  color: var(--white);
}

.clinic-btn:active {
  transform: scale(0.98);
}

.clinic-btn:focus-visible {
  outline: 3px solid rgba(47, 125, 114, 0.35);
  outline-offset: 2px;
}

/* Submit button */
.submit-btn {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 50px;
  background: var(--primary);
  color: var(--white);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.submit-btn:hover:not(:disabled) {
  background: var(--primary-dark);
}

.submit-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Status messages (info / error) */
.status-message {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
}

.status-message.info {
  background: var(--info-bg);
  color: var(--info-text);
  border: 1px solid var(--info-border);
}

.status-message.error {
  background: var(--error-bg);
  color: var(--error-text);
  border: 1px solid var(--error-border);
}

/* Hide the status box entirely while empty */
.status-message:empty {
  display: none;
}

/* Success state */
.success-state {
  text-align: center;
  padding: 16px 0 4px;
  animation: fade-in 0.35s ease;
}

.success-state h2 {
  margin: 0 0 8px;
  color: var(--primary-dark);
  font-size: 1.3rem;
}

.success-state p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Utility */
.hidden {
  display: none !important;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Small screens */
@media (max-width: 480px) {
  .card {
    padding: 26px 20px;
    border-radius: 16px;
  }

  h1 {
    font-size: 1.25rem;
  }

  .star {
    font-size: 1.9rem;
  }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
