/* ── Internet-Störung Applet Custom Styles ────────────────────────
   Inherits design system, CSS tokens, and components 1:1 from shared/components.css.
   ───────────────────────────────────────────────────────────────── */

.app-container {
  max-width: 540px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 16px;
  box-sizing: border-box;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 52px);
}

#view-wizard {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Header Brand Link Alignment */
.brand-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: var(--surface-3, var(--surface-2));
  border: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #40c5d4;
  flex-shrink: 0;
}

.header-brand {
  font-size: 1.05rem;
  font-weight: 700;
  color: #40c5d4;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.obj-badge {
  font-size: .88rem;
  font-weight: 400;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Multi-step Progress Node Indicator */
.wizard-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  position: relative;
}

.progress-track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--surface-3, var(--surface-2));
  transform: translateY(-50%);
  z-index: 1;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}

.step-node {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-3, var(--surface-2));
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  z-index: 2;
  border: 3px solid var(--bg);
  transition: all 0.2s ease;
}

.step-node.active {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.step-node.completed {
  background: var(--ok);
  color: #ffffff;
}

/* Wizard Section Card */
.wizard-card {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.step-header {
  margin-bottom: 20px;
}

.step-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: var(--text);
}

.step-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
}

/* ── Balanced Step 1 Pre-Check Choice Grid ───────────────────── */
.precheck-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

@media (max-width: 480px) {
  .precheck-grid {
    grid-template-columns: 1fr;
  }
}

.btn-precheck {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface-3, var(--surface));
  border: 1.5px solid var(--border-2);
  border-radius: var(--r-md);
  padding: 13px 18px;
  height: 48px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.btn-precheck:hover {
  transform: translateY(-1px);
}

.btn-precheck-yes:hover {
  border-color: var(--ok);
  background: var(--ok-bg);
  color: var(--ok);
}

.btn-precheck-no:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

.precheck-icon {
  font-size: 1rem;
  font-weight: 700;
}

/* Choice Grid Options (Step 2) */
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

@media (max-width: 480px) {
  .choice-grid {
    grid-template-columns: 1fr;
  }
}

.choice-option {
  position: relative;
  cursor: pointer;
}

.choice-box {
  background: var(--surface-3, var(--surface));
  border: 1.5px solid var(--border-2);
  border-radius: var(--r-md);
  padding: 14px;
  transition: border-color 0.15s, background 0.15s;
  height: 100%;
  box-sizing: border-box;
}

.choice-option input[type="radio"]:checked + .choice-box {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 0 2px var(--accent-border);
}

.choice-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
}

.choice-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.35;
}

/* ── Symptom Selection Grid & Cards (Step 4) ──────────────────── */
.symptoms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

@media (max-width: 480px) {
  .symptoms-grid {
    grid-template-columns: 1fr;
  }
}

.symptom-card {
  cursor: pointer;
  display: block;
}

.symptom-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-3, var(--surface));
  border: 1.5px solid var(--border-2);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}

.symptom-card:hover .symptom-box {
  border-color: var(--accent);
}

.symptom-card input[type="checkbox"]:checked + .symptom-box {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 0 2px var(--accent-border);
}

.symptom-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Form Group Layout */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

/* ── Summary Card Review Items (Step 5) ───────────────────────── */
.summary-card-container {
  background: var(--surface-3, var(--surface));
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-item-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.review-item-val {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

/* Wizard Actions Bar */
.wizard-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-2);
}

.wizard-actions .btn-primary,
.wizard-actions .btn-secondary {
  border-radius: var(--r-md);
  padding: 12px 18px;
  font-size: 0.92rem;
  font-weight: 600;
  height: 44px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  cursor: pointer;
}

/* Confirmation Success Screen */
.success-card {
  text-align: center;
  padding: 24px 12px;
}

.success-icon-badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ok-bg);
  border: 2px solid var(--ok);
  color: var(--ok);
  font-size: 1.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

/* Ticket List & Admin Card Items */
.ticket-card {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}

.ticket-card:hover {
  border-color: var(--accent);
}

.ticket-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  text-transform: uppercase;
}

.badge-new { background: rgba(79, 70, 229, 0.15); color: #818cf8; }
.badge-in_progress { background: var(--warn-bg); color: var(--warn); }
.badge-done { background: var(--ok-bg); color: var(--ok); }

/* Detail Inspector Modal Overlay */
.ticket-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.ticket-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-panel {
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
