/* ==========================================================================
   The Urban Physio - Patient Enquiry Form Stylesheet
   Modern, Clean, Responsive Healthcare UI
   ========================================================================== */

:root {
  --primary: #0d9488;
  --primary-hover: #0f766e;
  --primary-light: #f0fdfa;
  --primary-ring: rgba(13, 148, 136, 0.25);
  
  --secondary: #0284c7;
  --secondary-hover: #0369a1;

  --text-dark: #0f172a;
  --text-muted: #475569;
  --text-light: #94a3b8;
  
  --bg-body: #f8fafc;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --card-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.03);
  
  --error: #ef4444;
  --error-bg: #fef2f2;
  --success: #10b981;
  --success-bg: #ecfdf5;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  padding: 30px 16px 60px;
}

/* Background Ambient Glows */
.page-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.blob {
  position: absolute;
  filter: blur(80px);
  border-radius: 50%;
  opacity: 0.45;
}

.blob-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #ccfbf1 0%, rgba(204, 251, 241, 0) 70%);
  top: -100px;
  left: 10%;
}

.blob-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #e0f2fe 0%, rgba(224, 242, 254, 0) 70%);
  top: 40%;
  right: 5%;
}

/* Container */
.container {
  max-width: 820px;
  margin: 0 auto;
}

/* Header Section */
.brand-header {
  background: linear-gradient(135deg, #ffffff 0%, #f0fdfa 100%);
  border: 1px solid #ccfbf1;
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo-badge {
  background: linear-gradient(135deg, var(--primary) 0%, #0f766e 100%);
  width: 58px;
  height: 58px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 8px 16px -4px rgba(13, 148, 136, 0.4);
}

.medical-cross {
  width: 32px;
  height: 32px;
}

.brand-info {
  flex: 1;
}

.brand-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: #ccfbf1;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 6px;
}

.brand-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.25;
  margin-bottom: 6px;
}

.brand-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Form Styles */
#patientEnquiryForm {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Form Sections */
.form-section {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  box-shadow: var(--card-shadow);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.step-num {
  font-size: 0.85rem;
  font-weight: 800;
  background: var(--primary-light);
  color: var(--primary);
  border: 1.5px solid #99f6e4;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

.section-heading h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
}

.section-heading p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Form Groups & Inputs */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  position: relative;
}

.form-group:last-child {
  margin-bottom: 0;
}

label, .block-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
}

.req {
  color: var(--error);
  font-weight: 700;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-light);
  pointer-events: none;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-dark);
  background-color: #ffffff;
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  transition: var(--transition);
  outline: none;
}

.input-wrapper input {
  padding-left: 42px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-ring);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-light);
  font-size: 0.9rem;
}

.readonly-input {
  background-color: #f8fafc !important;
  color: var(--text-muted) !important;
  cursor: not-allowed;
  font-weight: 600;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.grid-span-email {
  grid-column: span 1;
}

/* Pain Scale Slider */
.slider-container {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 14px 18px 10px;
  margin-top: 4px;
}

.pain-badge {
  display: inline-block;
  background: #fef3c7;
  color: #b45309;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  margin-left: 8px;
  transition: var(--transition);
}

.pain-badge.mild {
  background: #ecfdf5;
  color: #047857;
}

.pain-badge.moderate {
  background: #fef3c7;
  color: #b45309;
}

.pain-badge.severe {
  background: #fef2f2;
  color: #b91c1c;
}

.pain-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: linear-gradient(to right, #10b981 0%, #f59e0b 50%, #ef4444 100%);
  outline: none;
  margin: 10px 0 6px;
  cursor: pointer;
}

.pain-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--primary);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.pain-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Consultation Mode Selector (Cards) */
.mode-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 6px;
}

.radio-card {
  position: relative;
  cursor: pointer;
}

.radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.card-inner {
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  text-align: center;
  background: #ffffff;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
}

.card-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.radio-card input[type="radio"]:checked + .card-inner {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 2px var(--primary);
}

.radio-card:hover .card-inner {
  border-color: #cbd5e1;
}

/* Error States */
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
  border-color: var(--error);
  background-color: var(--error-bg);
}

.error-msg {
  display: none;
  font-size: 0.78rem;
  color: var(--error);
  font-weight: 600;
  margin-top: 2px;
}

.form-group.has-error .error-msg {
  display: block;
}

/* Submit Section */
.submit-wrapper {
  text-align: center;
  margin-top: 8px;
}

.btn-primary {
  width: 100%;
  max-width: 440px;
  padding: 15px 30px;
  background: linear-gradient(135deg, var(--primary) 0%, #0f766e 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 20px -5px rgba(13, 148, 136, 0.4);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 25px -5px rgba(13, 148, 136, 0.5);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-spinner {
  display: none;
  align-items: center;
  gap: 8px;
}

.btn-spinner.active {
  display: inline-flex;
}

.btn-text.hidden {
  display: none;
}

.spinner-svg {
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

.spinner-path {
  stroke: #ffffff;
  stroke-linecap: round;
  stroke-dasharray: 60;
  stroke-dashoffset: 20;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

.privacy-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 12px;
}

/* Footer */
.form-footer {
  text-align: center;
  margin-top: 36px;
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.6;
}

.form-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.form-footer a:hover {
  text-decoration: underline;
}

/* Success Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
  animation: fadeIn 0.25s ease-out;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.success-icon-wrap {
  width: 68px;
  height: 68px;
  background: #ecfdf5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  color: var(--success);
}

.success-icon-wrap svg {
  width: 36px;
  height: 36px;
}

.modal-card h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.modal-subtext {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.modal-summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.88rem;
  margin-bottom: 20px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.summary-item span {
  color: var(--text-muted);
}

.summary-item strong {
  color: var(--text-dark);
  text-align: right;
}

.modal-followup {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.btn-secondary {
  padding: 11px 24px;
  background: #f1f5f9;
  color: var(--text-dark);
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: #e2e8f0;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  body {
    padding: 16px 12px 40px;
  }

  .brand-header {
    flex-direction: column;
    text-align: center;
    padding: 22px 18px;
    gap: 14px;
  }

  .form-section {
    padding: 20px 16px;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .mode-selector {
    grid-template-columns: 1fr;
  }

  .btn-primary {
    max-width: 100%;
  }
}

