/* ============================================================
   TradeRail — PR344 Pre-Mobilization Briefing Engine
   Styles
   Build marker: pr344-premob-briefing:2026-06-19

   Lily bar: purple left border #7C3AED, background #f5f0ff
   No emoji anywhere in UI.
   ============================================================ */

/* ── Main panel container ────────────────────────────────────── */
.premob-panel {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #1a1a1a;
  background: #ffffff;
  padding: 20px;
  max-width: 860px;
  box-sizing: border-box;
}

/* ── Project card ────────────────────────────────────────────── */
.premob-project-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
}

.premob-project-card:last-child {
  margin-bottom: 0;
}

/* ── Blocker badge (red) ─────────────────────────────────────── */
.premob-blocker-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #dc2626;
  color: #ffffff;
  border-radius: 5px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.4;
}

.premob-blocker-badge a {
  color: #ffffff;
  text-decoration: underline;
  white-space: nowrap;
}

/* ── Warning badge (amber) ───────────────────────────────────── */
.premob-warning-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fbbf24;
  border-radius: 5px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 6px;
  line-height: 1.4;
}

.premob-warning-badge a {
  color: #92400e;
  text-decoration: underline;
  white-space: nowrap;
}

/* ── Acknowledgment progress bar ─────────────────────────────── */
.premob-ack-bar {
  width: 100%;
  height: 10px;
  background: #e5e7eb;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 4px;
  box-sizing: border-box;
}

/* Fill color set inline as green (#16a34a) in JS */

/* ── Per-worker acknowledgment row ──────────────────────────── */
.premob-ack-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 3px;
  border-left: 3px solid transparent;
}

.premob-ack-row.acked {
  background: #f0fdf4;
  border-left-color: #16a34a;
  color: #166534;
}

.premob-ack-row.pending {
  background: #fffbeb;
  border-left-color: #f59e0b;
  color: #92400e;
}

.premob-ack-row.failed {
  background: #fef2f2;
  border-left-color: #dc2626;
  color: #991b1b;
}

/* ── Crew assignment list ────────────────────────────────────── */
.premob-crew-list {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

/* ── Foreman full briefing card ──────────────────────────────── */
.premob-briefing-card {
  background: #f5f5f5;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.6;
}

.premob-briefing-card strong {
  color: #374151;
}

/* ── Field tech SMS preview ──────────────────────────────────── */
.premob-sms-preview {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  padding: 10px 12px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #374151;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 12px;
}

/* ── Send / action button (orange) ──────────────────────────── */
.premob-send-btn {
  display: inline-block;
  background: #FF6B00;
  color: #ffffff;
  border: none;
  border-radius: 5px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  transition: background 0.15s ease;
}

.premob-send-btn:hover {
  background: #e05e00;
}

.premob-send-btn:disabled {
  background: #f59e0b;
  cursor: not-allowed;
  opacity: 0.6;
}

/* ── Resend confirmation modal ───────────────────────────────── */
.premob-resend-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
}

.premob-resend-modal__inner {
  background: #ffffff;
  border-radius: 10px;
  padding: 28px 32px;
  max-width: 440px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.premob-resend-modal__title {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 10px;
}

.premob-resend-modal__body {
  font-size: 13px;
  color: #555;
  margin-bottom: 20px;
  line-height: 1.5;
}

.premob-resend-modal__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.premob-resend-modal__cancel {
  background: #e5e7eb;
  color: #374151;
  border: none;
  border-radius: 5px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.premob-resend-modal__cancel:hover {
  background: #d1d5db;
}

/* ── Toolbox talk card ───────────────────────────────────────── */
.premob-toolbox-card {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 12px;
  font-size: 13px;
}

/* ── Toolbox talk completed state ────────────────────────────── */
.premob-toolbox-complete {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
  border-radius: 5px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
}

/* ── Lily insight bar ────────────────────────────────────────── */
.lily-premob-insight {
  border-left: 4px solid #7C3AED;
  background: #f5f0ff;
  color: #3b0764;
  border-radius: 0 6px 6px 0;
  padding: 8px 12px;
  font-size: 13px;
  margin-bottom: 10px;
  line-height: 1.5;
}

.lily-premob-insight strong {
  color: #7C3AED;
}

/* Tier-specific accents */
.lily-premob-insight[data-tier="B"] {
  border-left-color: #dc2626;
  background: #fff1f2;
  color: #7f1d1d;
}

.lily-premob-insight[data-tier="B"] strong {
  color: #dc2626;
}

.lily-premob-insight[data-tier="D"] {
  border-left-color: #16a34a;
  background: #f0fdf4;
  color: #14532d;
}

.lily-premob-insight[data-tier="D"] strong {
  color: #16a34a;
}

.lily-premob-insight[data-tier="E"] {
  border-left-color: #f59e0b;
  background: #fffbeb;
  color: #78350f;
}

.lily-premob-insight[data-tier="E"] strong {
  color: #f59e0b;
}

.lily-premob-insight[data-tier="F"] {
  border-left-color: #dc2626;
  background: #fef2f2;
  color: #7f1d1d;
}

.lily-premob-insight[data-tier="F"] strong {
  color: #dc2626;
}

/* ── Section header ──────────────────────────────────────────── */
.premob-section-header {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid #e5e7eb;
}

/* ── Status badges ───────────────────────────────────────────── */
.premob-status-sent {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.premob-status-pending {
  display: inline-block;
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .premob-panel {
    padding: 12px;
  }

  .premob-project-card {
    padding: 12px;
  }

  .premob-resend-modal__inner {
    padding: 20px 16px;
  }

  .premob-send-btn {
    width: 100%;
    text-align: center;
  }
}
