/* survey-viewer.css — Standalone survey public viewer */

body {
  margin: 0;
  background: #f5f7fa;
  font-family: var(--bs-font-sans-serif, system-ui, -apple-system, sans-serif);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Admin back-to-editor bar */
#survey-admin-bar {
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  padding: 6px 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}
#survey-admin-bar a {
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}
#survey-admin-bar a:hover { text-decoration: underline; }

#survey-app {
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  flex: 1;
  width: 100%;
}

#survey-header {
  text-align: center;
  margin-bottom: 2rem;
}

#survey-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

#survey-header p {
  color: rgba(255,255,255,0.85);
  font-size: 1rem;
  line-height: 1.5;
}

#survey-project-name {
  color: rgba(255,255,255,0.7) !important;
}

#survey-form-container {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  backdrop-filter: blur(4px);
}

/* Survey question styling overrides for standalone view */
#survey-form-container .wm-group {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #f0f0f0;
}

#survey-form-container .wm-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

#survey-form-container label {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  display: block;
}

#survey-form-container .wm-control {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  font-size: 0.95rem;
  transition: border-color 0.15s;
}

#survey-form-container .wm-control:focus {
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(13,110,253,0.15);
}

#survey-form-container .wm-required label::after {
  content: ' *';
  color: #dc3545;
}

#survey-submit-bar {
  margin-top: 1.5rem;
}

#survey-submit-btn {
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
}

#survey-footer {
  margin-top: auto;
}
#survey-footer a {
  color: rgba(255,255,255,0.6) !important;
}
#survey-footer a:hover {
  color: rgba(255,255,255,0.9) !important;
}

/* Radio/checkbox styling */
#survey-form-container .wm-radio-item,
#survey-form-container .wm-check-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
}

#survey-form-container .wm-radio-item input,
#survey-form-container .wm-check-item input {
  width: 18px;
  height: 18px;
  margin: 0;
}

/* Photo upload */
#survey-form-container .wm-photo-preview {
  max-width: 200px;
  border-radius: 6px;
  margin-top: 0.5rem;
}

/* Page navigation */
#survey-form-container .wm-btn-outline {
  padding: 0.4rem 1rem;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
}

#survey-form-container .wm-btn-outline:hover {
  background: #f8f9fa;
}

/* Thank you state */
#survey-thank-you {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  backdrop-filter: blur(4px);
}

@media (max-width: 600px) {
  #survey-app {
    padding: 1rem;
  }
  #survey-form-container {
    padding: 1.25rem;
    border-radius: 8px;
  }
  #survey-header h1 {
    font-size: 1.4rem;
  }
}

/* Validation error styling */
.error {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2) !important;
}

.wm-group.wm-required .error {
  outline: 2px solid #dc3545;
  outline-offset: 2px;
}
