/* Sync watch issues quiz — builds on create-plan-quiz.css */

/* Full-height shell + scrollable screens on small devices */
body.qp-body:has(#sw-root) {
  overflow-x: hidden;
  overflow-y: hidden;
}

body.qp-body:has(#sw-root) .qp-phone-screen {
  height: var(--qp-vvh, 100dvh);
  min-height: var(--qp-vvh, 100dvh);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#sw-root.qp-root {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#sw-app.qp-app {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  display: flex;
  flex-direction: column;
}

#sw-app .qp-stage {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

#sw-app .qp-screen {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: max(1.5rem, calc(env(safe-area-inset-bottom, 0px) + 1.25rem));
}

@media (min-width: 768px) {
  body.qp-body:has(#sw-root) .qp-phone-screen {
    height: 100%;
    min-height: 0;
  }
}

.sw-option-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
}

.sw-brand-icon {
  width: 1.85rem;
  height: 1.85rem;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 6px;
}

.sw-brand-icon--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
}

.sw-brand-icon--fallback svg {
  width: 1.15rem;
  height: 1.15rem;
}

.sw-option-label {
  flex: 1;
  text-align: left;
  line-height: 1.35;
}

.sw-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0 0.85rem;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: lowercase;
}

.sw-divider::before,
.sw-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.sw-media {
  display: block;
  width: 100%;
  max-height: min(62vh, 520px);
  margin: 1rem 0 1.35rem;
  border-radius: 14px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
}

.sw-media-row {
  display: flex;
  gap: 0.55rem;
  align-items: stretch;
  margin: 1rem 0 1.35rem;
}

.sw-media-row .sw-media--half {
  flex: 1 1 0;
  width: 50%;
  max-height: min(42vh, 320px);
  margin: 0;
}

.sw-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.9rem 0 0;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(227, 24, 55, 0.55);
  background: rgba(227, 24, 55, 0.16);
}

.sw-notice-icon {
  flex: 0 0 auto;
  line-height: 1.3;
  font-size: 1rem;
}

.sw-notice-text {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(255, 230, 233, 0.95);
}

.sw-info {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.9rem 0 0;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(64, 156, 255, 0.55);
  background: rgba(64, 156, 255, 0.14);
}

.sw-info-icon {
  flex: 0 0 auto;
  line-height: 1.3;
  font-size: 1rem;
}

.sw-info-text {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(220, 238, 255, 0.95);
}

.sw-footer-actions--stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.sw-btn-secondary {
  width: 100%;
  font-size: 0.9rem;
  line-height: 1.35;
  white-space: normal;
  padding: 0.85rem 1rem;
}

.sw-notice-wrap {
  margin-top: 0.75rem;
}

.sw-notice-wrap .sw-notice {
  margin-top: 0;
}

.sw-notice-wrap .sw-notice-text {
  font-size: 0.92rem;
}

.sw-steps {
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.sw-steps li {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
}

.sw-copy {
  margin: 0.55rem 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
}

.sw-copy + .sw-copy {
  margin-top: 0.75rem;
}

.sw-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.15rem;
}

.sw-label {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
}

.sw-input,
.sw-textarea {
  width: 100%;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #1c1c1e;
  color: #fff;
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1.4;
}

.sw-textarea {
  min-height: 8.5rem;
  resize: vertical;
}

.sw-input:focus,
.sw-textarea:focus {
  outline: none;
  border-color: rgba(227, 24, 55, 0.7);
  box-shadow: 0 0 0 3px rgba(227, 24, 55, 0.18);
}

.sw-field-error {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: #ff7b87;
}

.sw-footer-actions {
  margin-top: 1.25rem;
}

.sw-success-wrap {
  text-align: center;
  padding-top: 0.5rem;
}

.sw-success-wrap .sw-media {
  max-height: 280px;
  margin-left: auto;
  margin-right: auto;
}

.sw-success-wrap .sw-copy {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}

.qp-option.sw-option-multiline {
  padding-top: 0.95rem;
  padding-bottom: 0.95rem;
}

.qp-option.sw-option-multiline .sw-option-row {
  align-items: flex-start;
}

.qp-option.sw-option-multiline .qp-option-emoji,
.qp-option.sw-option-multiline .sw-brand-icon,
.qp-option.sw-option-multiline .sw-brand-icon--fallback {
  margin-top: 0.12rem;
}

.qp-option.sw-option-multiline .sw-option-label {
  font-size: 0.92rem;
}
