/* ==========================================================================
   Service Satisfaction Survey - Light Theme Mobile UI
   ========================================================================== */

/* Design Tokens */
:root {
  --bg-color: #f1f5f9;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;
  --border-color: #e2e8f0;
  --input-bg: #f8fafc;
  --input-border: #cbd5e1;
  --input-focus-border: #2563eb;
  
  /* Required Colors */
  --primary-blue: #2563eb;
  --primary-blue-hover: #1d4ed8;
  --primary-blue-active: #1e40af;
  --star-gold: #f59e0b;
  --star-gold-hover: #fbbf24;
  --star-inactive: #cbd5e1;
  
  /* Feedback & Accents */
  --badge-bg: #eff6ff;
  --badge-text: #1d4ed8;
  --notes-bg: #f8fafc;
  --notes-border: #cbd5e1;
  --error-color: #ef4444;

  /* Typography */
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Shadows & Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* Global Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 0;
  margin: 0;
}

/* Mobile Wrapper Container */
.app-container {
  width: 100%;
  max-width: 500px;
  background-color: var(--card-bg);
  min-height: 100vh;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

@media (min-width: 520px) {
  body {
    padding: 20px 0;
  }
  .app-container {
    min-height: auto;
    border-radius: 24px;
    margin: auto;
    border: 1px solid var(--border-color);
  }
}

/* Top Header Banner */
.header-banner {
  position: relative;
  width: 100%;
  height: 190px;
  background-color: #0f172a;
  overflow: hidden;
}

.banner-image-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.1) 0%, rgba(255, 255, 255, 0.4) 100%);
}

/* Main Content Body */
.content-card {
  padding: 20px 20px 30px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: -12px;
  background-color: var(--card-bg);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  position: relative;
  z-index: 2;
}

/* Header Intro Section */
.badge {
  display: inline-block;
  background-color: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

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

.subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 14px;
}

/* Notes & Instructions Box */
.notes-box {
  background-color: var(--notes-bg);
  border: 1px solid var(--notes-border);
  border-left: 4px solid var(--text-main);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.notes-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.825rem;
  color: var(--text-main);
  margin-bottom: 6px;
}

.info-icon {
  color: var(--text-main);
}

.notes-list {
  padding-left: 18px;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Progress Tracker */
.progress-wrapper {
  margin-top: 8px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 4px;
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background-color: var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--primary-blue);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

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

.section-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-color);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background-color: var(--text-main);
  color: #ffffff;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 800;
}

/* Question Card */
.questions-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.question-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.question-card.active-filled {
  border-color: #cbd5e1;
  background-color: #fafafa;
}

.question-card.has-error {
  border-color: var(--error-color);
  background-color: #fef2f2;
}

.question-label {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.q-number {
  font-weight: 800;
  color: var(--text-main);
  font-size: 0.95rem;
}

.q-text {
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.35;
}

/* Star Rating Controls */
.star-rating {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 4px;
  gap: 6px;
}

.star-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.star-btn:focus {
  outline: none;
}

.star-btn:active {
  transform: scale(1.3);
}

.star-svg {
  width: 34px;
  height: 34px;
  fill: var(--star-inactive);
  transition: fill 0.2s ease, filter 0.2s ease, transform 0.2s ease;
}

/* Gold Star Active State when Clicked or Hovered */
.star-btn.active .star-svg,
.star-btn.hover .star-svg {
  fill: var(--star-gold);
  filter: drop-shadow(0 2px 5px rgba(245, 158, 11, 0.4));
}

.star-btn.hover .star-svg {
  fill: var(--star-gold-hover);
}

/* Rating Text Badge */
.rating-feedback-badge {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-light);
  margin-top: 6px;
  min-height: 18px;
  transition: color 0.2s ease;
}

.rating-feedback-badge.selected {
  color: var(--text-main);
  font-weight: 700;
}

/* Input Fields Group */
.personal-info-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-field-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.required-asterisk {
  color: var(--error-color);
}

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

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

.form-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  font-family: var(--font-family);
  font-size: 0.9rem;
  color: var(--text-main);
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-input::placeholder {
  color: #94a3b8;
}

.form-input:focus {
  background-color: #ffffff;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.input-field-wrapper.has-error .form-input {
  border-color: var(--error-color);
  background-color: #fef2f2;
}

/* Validation Error Message */
.error-msg {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--error-color);
  display: none;
  margin-top: 2px;
}

.question-card.has-error .error-msg,
.input-field-wrapper.has-error .error-msg {
  display: block;
}

/* Primary Blue Button */
.submit-container {
  margin-top: 10px;
}

.primary-blue-btn {
  width: 100%;
  padding: 14px 20px;
  background-color: var(--primary-blue);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.primary-blue-btn:hover {
  background-color: var(--primary-blue-hover);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

.primary-blue-btn:active {
  background-color: var(--primary-blue-active);
  transform: scale(0.98);
}

.btn-arrow {
  transition: transform 0.2s ease;
}

.primary-blue-btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* Footer */
.app-footer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

/* Modal Window */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: #ffffff;
  width: 100%;
  max-width: 400px;
  border-radius: 20px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-icon-circle {
  width: 64px;
  height: 64px;
  background: #eff6ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
}

.modal-message {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 20px;
}

.summary-box {
  background-color: var(--notes-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}

.summary-item strong {
  color: var(--text-main);
}

.modal-btn {
  padding: 12px;
}
