/* Spot the Phish (js/phish-test.js). The email mock is always light, like a
   real mail client; pages theme the side panel through the --pt-* tokens. */
.pt {
  --pt-text: #1A2421;
  --pt-muted: #53625F;
  --pt-panel: #FFFFFF;
  --pt-border: #E8E0D2;
  --pt-accent: #E64A19;
  --pt-good: #059669;
  --pt-bad: #DC2626;
  text-align: left;
}

.pt-board {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

/* Email mock */
.pt-mail {
  background: #FFFFFF;
  color: #1F2937;
  border: 1px solid #D9DEE5;
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(11, 37, 70, 0.18);
  overflow: hidden;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.pt-mail-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #F1F4F8;
  border-bottom: 1px solid #E2E7EE;
}

.pt-mail-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #CBD3DD;
}

.pt-mail-bar em {
  margin-left: 8px;
  font-style: normal;
  font-size: 12px;
  color: #6B7280;
}

.pt-mail-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px 8px;
}

.pt-mail-meta {
  min-width: 0;
}

.pt-mail-to {
  font-size: 12.5px;
  color: #6B7280;
  padding-left: 6px;
}

.pt-mail-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 18px 20px;
  font-size: 14.5px;
  line-height: 1.55;
}

/* Every clickable part of the email */
.pt-spot {
  position: relative;
  display: block;
  max-width: 100%;
  padding: 4px 6px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.pt-spot:hover {
  background: rgba(92, 156, 230, 0.10);
}

.pt-spot:focus-visible {
  outline: none;
  border-color: #5C9CE6;
}

.pt-spot strong {
  display: block;
  font-size: 15px;
}

.pt-spot > span {
  font-size: 13px;
  color: #6B7280;
  overflow-wrap: anywhere;
}

.pt-inline {
  display: inline-block;
}

.pt-logo {
  flex: none;
  padding: 6px;
}

.pt-ms {
  display: grid;
  grid-template-columns: 14px 14px;
  gap: 3px;
}

.pt-ms i {
  height: 14px;
}

.pt-ms i:nth-child(1) { background: #F25022; }
.pt-ms i:nth-child(2) { background: #7FBA00; }
.pt-ms i:nth-child(3) { background: #00A4EF; }
.pt-ms i:nth-child(4) { background: #FFB900; }

.pt-subject {
  margin: 0 12px 6px;
  font-size: 17px;
  font-weight: 700;
  color: #111827;
}

.pt-cta {
  padding: 10px 22px;
  background: #0F6CBD;
  color: #FFFFFF;
  font-weight: 600;
  border-radius: 6px;
}

.pt-cta:hover {
  background: #115EA3;
}

.pt-link-wrap {
  position: relative;
  align-self: stretch;
  padding: 4px 0;
}

/* Fake browser status bar showing where the button really goes */
.pt-url {
  position: absolute;
  left: 0;
  top: calc(100% + 2px);
  z-index: 2;
  padding: 4px 8px;
  border-radius: 4px;
  background: #1F2937;
  color: #F9FAFB;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11.5px;
  max-width: 100%;
  overflow-wrap: anywhere;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.pt-link-wrap:hover .pt-url,
.pt-link-wrap.is-open .pt-url {
  opacity: 1;
}

/* Once found, the real address stays visible in the flow of the email */
.pt-link-wrap.is-open .pt-url {
  position: static;
  display: inline-block;
  margin-top: 8px;
}

.pt-attach {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 8px 12px;
  border-color: #E5E7EB;
  background: #F9FAFB;
}

.pt-attach strong {
  font-size: 13.5px;
  overflow-wrap: anywhere;
}

.pt-attach small {
  display: block;
  font-size: 12px;
  color: #6B7280;
}

.pt-attach-icon {
  flex: none;
  padding: 6px 5px;
  border-radius: 4px;
  background: #DC2626;
  color: #FFFFFF !important;
  font-size: 10px !important;
  font-weight: 800;
}

.pt-footer {
  margin-top: 6px;
  font-size: 12px;
  color: #9CA3AF;
}

/* States */
.pt-spot.is-found,
.pt-spot.is-missed {
  cursor: default;
}

.pt-spot.is-found {
  border-color: var(--pt-bad);
  background: rgba(220, 38, 38, 0.07);
}

.pt-spot.is-missed {
  border-color: #F59E0B;
  border-style: dashed;
  background: rgba(245, 158, 11, 0.08);
}

.pt-cta.is-found,
.pt-cta.is-missed {
  background: #0F6CBD;
}

.pt-spot.is-found::after,
.pt-spot.is-missed::after {
  content: "!";
  position: absolute;
  top: -10px;
  right: -10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--pt-bad);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  animation: pt-pop 0.3s ease;
}

.pt-spot.is-missed::after {
  background: #F59E0B;
}

.pt-spot.is-decoy {
  animation: pt-shake 0.35s ease;
}

@keyframes pt-pop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

@keyframes pt-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Side panel */
.pt-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--pt-text);
}

.pt-progress {
  font-size: 14px;
  color: var(--pt-muted);
}

.pt-count {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--pt-text);
  margin-right: 4px;
}

.pt-dots {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.pt-dots i {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--pt-border);
  transition: background 0.3s ease;
}

.pt-dots i.is-on {
  background: var(--pt-accent);
}

.pt-feedback {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--pt-muted);
}

.pt-feedback:empty {
  display: none;
}

.pt-found {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pt-found li {
  padding: 10px 12px;
  border-left: 3px solid var(--pt-bad);
  border-radius: 8px;
  background: var(--pt-panel);
  box-shadow: 0 0 0 1px var(--pt-border);
  animation: pt-pop-in 0.3s ease;
}

.pt-found li.is-missed {
  border-left-color: #F59E0B;
}

.pt-found strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.pt-found span {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--pt-muted);
}

@keyframes pt-pop-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.pt-reveal,
.pt-again {
  align-self: flex-start;
  padding: 4px 0;
  border: none;
  background: none;
  color: var(--pt-muted);
  font: inherit;
  font-size: 13.5px;
  text-decoration: underline;
  cursor: pointer;
}

.pt-result {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border-radius: 14px;
  background: var(--pt-panel);
  box-shadow: 0 0 0 1px var(--pt-border), 0 10px 28px rgba(11, 37, 70, 0.10);
  animation: pt-pop-in 0.35s ease;
}

.pt-score {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  color: var(--pt-accent);
}

.pt-score small {
  font-size: 20px;
  color: var(--pt-muted);
}

.pt-result h3 {
  margin: 0;
  font-size: 20px;
  color: var(--pt-text);
}

.pt-result p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--pt-muted);
}

.pt-claim {
  margin-top: 6px;
  min-height: 50px;
  padding: 12px 20px;
  line-height: 1.3;
  border: none;
  border-radius: 999px;
  background: var(--pt-accent);
  color: #FFFFFF;
  font: inherit;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(230, 74, 25, 0.3);
}

.pt-claim:hover {
  background: #D84315;
}

@media (max-width: 860px) {
  .pt-board {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pt * {
    animation: none !important;
    transition: none !important;
  }
}
