/* ==========================================================================
   PledgeCode — Free tools (FBR POS checker)
   Builds on the variables in app.css
   ========================================================================== */

/* ---------- Hero with the tool in it ---------- */
.tool-hero {
  padding: 130px 0 70px;
  background:
    radial-gradient(circle at 15% 20%, rgba(91, 91, 247, 0.32), transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(34, 211, 176, 0.12), transparent 40%),
    var(--pc-navy);
  color: #fff;
}
.tool-hero .breadcrumb-item,
.tool-hero .breadcrumb-item a,
.tool-hero .breadcrumb-item + .breadcrumb-item::before {
  color: var(--pc-text-muted-light);
  font-size: 0.85rem;
}
.tool-title {
  color: #fff;
  font-size: 2.6rem;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.tool-intro {
  color: var(--pc-text-muted-light);
  font-size: 1.08rem;
  max-width: 440px;
  margin-bottom: 26px;
}
.tool-facts { list-style: none; padding: 0; margin: 0; }
.tool-facts li {
  color: var(--pc-text-muted-light);
  font-size: 0.92rem;
  padding: 6px 0;
  display: flex;
  gap: 10px;
}
.tool-facts i { color: var(--pc-teal); }

/* ---------- Checker card ---------- */
.checker {
  background: #fff;
  color: var(--pc-ink);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  min-height: 360px;
}
.checker-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pc-text-muted);
}
.checker-bar {
  flex: 1;
  height: 6px;
  background: var(--pc-bg-alt);
  border-radius: 99px;
  overflow: hidden;
}
.checker-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--pc-accent);
  border-radius: 99px;
  transition: width 0.3s ease;
}
.checker-q {
  font-size: 1.45rem;
  line-height: 1.3;
  margin-bottom: 8px;
  outline: none;
}
.checker-help {
  color: var(--pc-text-muted);
  font-size: 0.95rem;
  margin-bottom: 0;
}
.checker-options {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}
.checker-option {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1.5px solid var(--pc-border);
  border-radius: 14px;
  padding: 16px 18px;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  color: var(--pc-ink);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.checker-option:hover { border-color: var(--pc-accent-light); background: rgba(91, 91, 247, 0.04); }
.checker-option:focus-visible { outline: 3px solid rgba(91, 91, 247, 0.4); outline-offset: 2px; }
.checker-option.is-selected {
  border-color: var(--pc-accent);
  background: var(--pc-accent);
  color: #fff;
}
.checker-back {
  margin-top: 18px;
  background: none;
  border: 0;
  padding: 6px 0;
  color: var(--pc-text-muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}
.checker-back:hover { color: var(--pc-accent); }
.checker-noscript { margin: 0; color: var(--pc-text-muted); }
.checker-noscript a { color: var(--pc-accent); }

/* ---------- Receipt (the result) ---------- */
.receipt {
  position: relative;
  max-width: 400px;
  margin: 0 auto 26px;
  background: #fff;
  padding: 24px 24px 34px;
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86rem;
  color: #1f2333;
  box-shadow: 0 1px 0 var(--pc-border), 0 12px 30px rgba(17, 20, 45, 0.12);
  border: 1px solid var(--pc-border);
  border-bottom: 0;
  /* torn thermal-paper edge */
  -webkit-mask: conic-gradient(from 135deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 8px repeat-x,
                linear-gradient(#000 0 0) top / 100% calc(100% - 8px) no-repeat;
          mask: conic-gradient(from 135deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 8px repeat-x,
                linear-gradient(#000 0 0) top / 100% calc(100% - 8px) no-repeat;
  overflow: hidden;
}
.receipt-head { text-align: center; line-height: 1.5; }
.receipt-head strong { display: block; font-size: 1rem; letter-spacing: 0.18em; }
.receipt-rule { border-top: 1.5px dashed #b9bccb; margin: 14px 0; }
.receipt-row { display: flex; justify-content: space-between; gap: 16px; padding: 2px 0; }
.receipt-row span:last-child { text-align: right; }
.receipt-label { color: #6b6f80; font-size: 0.78rem; margin-bottom: 4px; }
.receipt-title {
  font-family: inherit;
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 6px;
  color: #11142a;
  outline: none;
  padding-right: 70px; /* room for the stamp */
}
.receipt-reasons { margin-top: 12px; }
.receipt-reasons ul { list-style: none; padding: 0; margin: 0; }
.receipt-reasons li { padding: 2px 0 2px 22px; position: relative; }
.receipt-reasons li::before { content: attr(data-mark); position: absolute; left: 0; font-weight: 600; }
.receipt-foot { color: #6b6f80; font-size: 0.78rem; text-align: center; }

.receipt-stamp {
  position: absolute;
  top: 128px;
  right: 14px;
  transform: rotate(-12deg);
  font-family: var(--pc-font);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  padding: 6px 10px;
  border: 2.5px solid currentColor;
  border-radius: 6px;
  opacity: 0.88;
  max-width: 110px;
  text-align: center;
  line-height: 1.2;
}
.receipt-stamp.is-red { color: #D93A3A; }
.receipt-stamp.is-amber { color: #C98200; }
.receipt-stamp.is-green { color: #0F9F7E; }
.receipt-stamp.is-blue { color: var(--pc-accent); }

/* One moment of motion: the receipt prints, then the stamp lands */
.receipt.is-printing { animation: receipt-print 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.receipt.is-printing .receipt-stamp { animation: stamp-land 0.35s 0.65s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
@keyframes receipt-print {
  from { clip-path: inset(0 0 100% 0); transform: translateY(-8px); }
  to { clip-path: inset(0 0 0 0); transform: translateY(0); }
}
@keyframes stamp-land {
  from { opacity: 0; transform: rotate(-12deg) scale(1.8); }
  to { opacity: 0.88; transform: rotate(-12deg) scale(1); }
}

/* ---------- Result explanation ---------- */
.result-lead { font-size: 1rem; line-height: 1.65; margin-bottom: 12px; }
.result-points { padding-left: 20px; margin-bottom: 14px; color: var(--pc-text-muted); font-size: 0.95rem; line-height: 1.6; }
.result-points li { margin-bottom: 6px; }
.result-note {
  background: rgba(34, 211, 176, 0.1);
  border-left: 3px solid var(--pc-teal);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.95rem;
  margin-bottom: 16px;
}
.result-offer {
  background: var(--pc-bg-alt);
  border-radius: 14px;
  padding: 18px;
  margin-top: 6px;
}
.result-offer p { font-weight: 600; margin-bottom: 12px; }
.btn-whatsapp {
  background: #25D366;
  border: 1px solid #25D366;
  color: #fff;
  font-weight: 600;
  border-radius: 999px;
  padding: 11px 22px;
}
.btn-whatsapp:hover { background: #1DA851; border-color: #1DA851; color: #fff; }
.result-service {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--pc-accent);
}
.result-service:hover { color: var(--pc-accent-dark); text-decoration: underline; }
.result-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  font-size: 0.9rem;
}
.result-share, .result-restart {
  color: var(--pc-text-muted);
  font-weight: 600;
  background: none;
  border: 0;
  padding: 4px 0;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.result-share:hover, .result-restart:hover { color: var(--pc-accent); }

/* ---------- Call-back form ---------- */
#call-back { scroll-margin-top: 90px; }
.lead-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Guide below the tool ---------- */
.tool-guide { max-width: 780px; margin: 0 auto; }
.tool-guide h3 { font-size: 1.3rem; margin: 34px 0 12px; }
.tool-guide p, .tool-guide li { color: var(--pc-text-muted); line-height: 1.75; }
.tool-guide ul, .tool-guide ol { padding-left: 22px; margin-bottom: 14px; }
.tool-guide li { margin-bottom: 6px; }
.tool-updated { font-size: 0.9rem; color: var(--pc-text-muted); }
.tool-faq .accordion-item { border-color: var(--pc-border); }
.tool-faq .accordion-button { font-weight: 600; color: var(--pc-navy); }
.tool-faq .accordion-button:not(.collapsed) { background: rgba(91, 91, 247, 0.06); color: var(--pc-accent-dark); box-shadow: none; }
.tool-faq .accordion-body { color: var(--pc-text-muted); line-height: 1.7; }
.tool-sources { padding-left: 20px; font-size: 0.9rem; }
.tool-sources a { color: var(--pc-accent); word-break: break-word; }
.tool-disclaimer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--pc-border);
  font-size: 0.85rem;
  color: var(--pc-text-muted);
}

/* ---------- Service page ---------- */
.fbr-steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.fbr-steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 22px 52px;
  color: var(--pc-text-muted);
}
.fbr-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(91, 91, 247, 0.1);
  color: var(--pc-accent);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fbr-steps strong { display: block; color: var(--pc-navy); margin-bottom: 2px; }
.checker-promo {
  background: linear-gradient(135deg, rgba(91, 91, 247, 0.08), rgba(34, 211, 176, 0.08));
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius);
  padding: 28px;
}

/* ---------- Mobile ---------- */
@media (max-width: 991.98px) {
  .tool-hero { padding: 100px 0 40px; }
  .tool-title { font-size: 1.75rem; }
  .tool-intro { font-size: 0.98rem; margin-bottom: 4px; }
}
@media (max-width: 575.98px) {
  .checker { padding: 20px 16px; border-radius: 16px; margin: 0 -4px; min-height: 0; }
  .checker-q { font-size: 1.2rem; }
  .checker-option { padding: 14px 16px; }
  .receipt { padding: 20px 16px 30px; font-size: 0.8rem; }
  .receipt-title { font-size: 1rem; padding-right: 62px; }
  .receipt-stamp { font-size: 0.68rem; right: 8px; max-width: 92px; }
}

@media (prefers-reduced-motion: reduce) {
  .receipt.is-printing, .receipt.is-printing .receipt-stamp { animation: none; }
  .checker-bar span { transition: none; }
}

/* ==========================================================================
   UAE e-invoicing checker: deadline result
   ========================================================================== */
.dl-phase {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pc-text-muted);
  margin-bottom: 4px;
}
.dl-title {
  font-size: 1.35rem;
  line-height: 1.3;
  margin-bottom: 18px;
  outline: none;
}

/* The countdown is the one big thing on this result */
.dl-countdown {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--pc-navy);
}
.dl-days {
  font-size: 4.2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.dl-days-label { font-size: 1.05rem; font-weight: 600; color: var(--pc-text-muted); max-width: 220px; line-height: 1.3; }
.dl-countdown.is-urgent .dl-days { color: #C98200; }
.dl-countdown.is-late .dl-days { color: #D93A3A; }
.dl-status { margin: 10px 0 0; font-size: 0.95rem; color: var(--pc-text-muted); }
.dl-status.is-asp_overdue, .dl-status.is-live_now { color: #B42323; font-weight: 600; }
.dl-status.is-asp_urgent { color: #9A6400; font-weight: 600; }

/* Timeline: today's position against the two dates */
.dl-timeline { position: relative; margin: 34px 0 6px; padding-top: 22px; }
.dl-track { height: 6px; background: var(--pc-bg-alt); border-radius: 99px; overflow: hidden; }
.dl-fill { display: block; height: 100%; width: 0; background: var(--pc-accent-light); border-radius: 99px; }
.dl-today {
  position: absolute;
  top: 0;
  left: clamp(18px, var(--x, 0%), calc(100% - 18px));
  transform: translateX(-50%);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--pc-accent);
  text-align: center;
}
.dl-today::after {
  content: '';
  display: block;
  width: 2px;
  height: 22px;
  margin: 2px auto 0;
  background: var(--pc-accent);
}
.dl-points { display: flex; justify-content: space-between; gap: 16px; margin-top: 12px; }
.dl-point { position: static; font-size: 0.85rem; line-height: 1.35; }
.dl-point-end { text-align: right; }
.dl-point .dl-dot {
  position: absolute;
  top: 22px;
  left: var(--x, 0%);
  width: 16px;
  height: 16px;
  margin: -5px 0 0 -8px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--pc-navy);
}
.dl-point.is-done .dl-dot { background: var(--pc-teal); border-color: var(--pc-teal); }
.dl-point.is-missed .dl-dot { background: #D93A3A; border-color: #D93A3A; }
.dl-point-label { display: block; color: var(--pc-text-muted); }
.dl-point strong { color: var(--pc-navy); }

/* Readiness */
.dl-ready { margin-top: 26px; }
.dl-ready-head { display: flex; justify-content: space-between; font-size: 0.9rem; font-weight: 600; margin-bottom: 8px; }
.dl-meter { height: 10px; background: var(--pc-bg-alt); border-radius: 99px; overflow: hidden; }
.dl-meter span { display: block; height: 100%; width: 0; border-radius: 99px; transition: width 0.6s ease; }
.dl-meter span.is-low { background: #D93A3A; }
.dl-meter span.is-mid { background: #E0A100; }
.dl-meter span.is-good { background: var(--pc-teal); }

.dl-subhead { font-size: 1rem; margin: 24px 0 10px; }
.dl-steps { padding-left: 20px; margin-bottom: 14px; color: var(--pc-ink); font-size: 0.95rem; line-height: 1.55; }
.dl-steps li { margin-bottom: 8px; }
.dl-penalties { margin: 6px 0 18px; font-size: 0.92rem; }
.dl-penalties summary { cursor: pointer; font-weight: 600; color: var(--pc-navy); }
.dl-penalties ul { margin: 10px 0 0; padding-left: 20px; color: var(--pc-text-muted); }

/* One reveal when the result appears */
.checker-result.is-revealed .dl-countdown { animation: dl-pop 0.45s cubic-bezier(0.2, 0.8, 0.3, 1.2) both; }
@keyframes dl-pop { from { opacity: 0; transform: translateY(10px) scale(0.96); } to { opacity: 1; transform: none; } }

/* Deadline table in the guide */
.tool-table { font-size: 0.95rem; }
.tool-table th { color: var(--pc-navy); font-weight: 700; background: var(--pc-bg-alt); }
.tool-table td { color: var(--pc-ink); }

@media (max-width: 575.98px) {
  .dl-days { font-size: 3.2rem; }
  .dl-title { font-size: 1.15rem; }
  .dl-point { font-size: 0.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .checker-result.is-revealed .dl-countdown { animation: none; }
  .dl-meter span { transition: none; }
}

/* Deadline already passed (guide table) */
.tool-passed {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 8px;
  border-radius: 99px;
  background: rgba(217, 58, 58, 0.1);
  color: #B42323;
  font-size: 0.78rem;
  font-weight: 600;
}
.tool-table s { color: var(--pc-text-muted); }

/* ==========================================================================
   Guides (UAE Phase 2)
   ========================================================================== */
.guide-dates {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  max-width: 980px;
  margin: 0 auto;
  padding: 26px 30px;
  background: #fff;
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius);
}
.guide-count { display: flex; align-items: baseline; gap: 10px; color: var(--pc-navy); }
.guide-count-num { font-size: 3.6rem; font-weight: 800; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.guide-count-label { font-weight: 600; color: var(--pc-text-muted); max-width: 170px; line-height: 1.3; }
.guide-count.is-urgent .guide-count-num { color: #C98200; }
.guide-count.is-late .guide-count-label strong { color: #B42323; }
.guide-date-list { display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 0; }
.guide-date-list dt { font-size: 0.82rem; font-weight: 600; color: var(--pc-text-muted); }
.guide-date-list dd { margin: 0; font-weight: 700; color: var(--pc-navy); }

.guide-plan li strong { color: var(--pc-accent-dark); }
.guide-role {
  height: 100%;
  padding: 20px 22px;
  border-radius: 14px;
  background: var(--pc-bg-alt);
}
.guide-role.is-you { background: rgba(91, 91, 247, 0.07); }
.guide-role h3 { font-size: 1.05rem; margin: 0 0 10px; }
.guide-role ul { margin: 0; padding-left: 18px; }
.guide-checklist { list-style: none; padding-left: 0; }
.guide-checklist li { position: relative; padding-left: 28px; }
.guide-checklist li::before {
  content: '\F26B'; /* bi-check2-square */
  font-family: 'bootstrap-icons';
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--pc-teal);
}

@media (max-width: 767.98px) {
  .guide-dates { grid-template-columns: 1fr; gap: 18px; padding: 20px; }
  .guide-count-num { font-size: 2.8rem; }
}
