/* public/receivu.css */
/* Receivu unified stylesheet (teal #36D0C7) */

:root{
  --navy: #0f172a;
  --navy-2: #0b2a33;

  --teal: #36D0C7;
  --teal-2: #28bdb5;

  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #0b1220;
  --muted: #5b6475;
  --border: #e6eaf0;

  --shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
  --shadow-2: 0 10px 22px rgba(15, 23, 42, 0.10);

  --radius: 18px;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    "Apple Color Emoji","Segoe UI Emoji";
  background:
    radial-gradient(1200px 700px at 10% 0%, rgba(54,208,199,0.22), transparent 60%),
    radial-gradient(1000px 600px at 90% 10%, rgba(15,23,42,0.20), transparent 55%),
    var(--bg);
  color: var(--text);
  padding: 22px;
}

.shell{ max-width: 1200px; margin: 0 auto; }

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Top bar (centered brand) */
.topbar{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: linear-gradient(90deg, var(--navy), var(--navy-2));
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.topbar .spacer{ min-height: 1px; }

.brand-link{
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 0;
}

.brand-link:focus-visible{
  outline: 2px solid rgba(54,208,199,0.8);
  outline-offset: 4px;
  border-radius: 14px;
}

.logo-chip{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: 0 10px 20px rgba(0,0,0,0.18);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
}

.logo-chip img{
  width: 82%;
  height: 82%;
  object-fit: contain;
  display: block;
}

.brand-text{
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: left;
}

.brand-text .name{
  margin: 0;
  font-size: 1.12rem;
  font-weight: 950;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--teal);
}

.brand-text .tagline{
  margin: 2px 0 0;
  font-size: 0.86rem;
  color: rgba(255,255,255,0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Viewer header */
.viewerbar{
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: #fbfcfe;
}

@media (max-width: 860px){
  .viewerbar{
    position: sticky;
    top: 0;
    z-index: 20;
  }
}

.status{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.spinner{
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #e9eef5;
  border-top-color: var(--teal);
  animation: spin 0.9s linear infinite;
  flex: 0 0 auto;
}

@keyframes spin{ to { transform: rotate(360deg); } }

.status-wrap{
  display: flex;
  flex-direction: column;
  min-width: 0;
}

#previewStatus{
  font-size: 0.96rem;
  font-weight: 750;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-sub{
  margin-top: 3px;
  font-size: 0.85rem;
  color: var(--muted);
}

.actions{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.btn{
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 750;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    opacity 0.15s ease;
  white-space: nowrap;
}

.btn:active{ transform: translateY(1px); }

.btn:disabled{
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.btn-primary{
  background: linear-gradient(135deg, var(--teal), var(--teal-2));
  color: var(--navy);
  border-color: rgba(15,23,42,0.06);
  box-shadow: 0 10px 18px rgba(54,208,199,0.22);
}

.btn-primary:hover{
  box-shadow: 0 14px 26px rgba(54,208,199,0.28);
}

.btn-secondary{
  background: #ffffff;
  color: var(--navy);
  border-color: var(--border);
  box-shadow: 0 6px 14px rgba(15,23,42,0.06);
}

.btn-secondary:hover{
  box-shadow: var(--shadow-2);
  border-color: #dfe6ef;
}

.btn-ghost{
  background: rgba(15,23,42,0.03);
  color: var(--navy);
  border-color: rgba(15,23,42,0.06);
}

.btn-ghost:hover{ background: rgba(15,23,42,0.06); }

.icon{
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
}

.icon svg{
  width: 18px;
  height: 18px;
  display: block;
}

/* PDF viewer area */
.viewer{
  background: #ffffff;
  position: relative;
}

.pdf-frame{
  width: 100%;
  height: clamp(520px, calc(100vh - 320px), 900px);
  border: 0;
  display: block;
  background: #ffffff;
}

/* Loading overlay */
.loading-overlay{
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.80), rgba(255,255,255,0.92));
  border-top: 1px solid rgba(15,23,42,0.06);
  z-index: 5;
}

.loading-card{
  width: min(520px, 92%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-2);
  padding: 16px;
  display: grid;
  gap: 10px;
}

.loading-title{
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
  color: var(--navy);
}

.skeleton{
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef2f7, #f8fafc, #eef2f7);
  background-size: 200% 100%;
  animation: shimmer 1.1s infinite linear;
}

.skeleton.w60{ width: 60%; }
.skeleton.w85{ width: 85%; }
.skeleton.w40{ width: 40%; }

@keyframes shimmer{
  0%{ background-position: 0% 0%; }
  100%{ background-position: -200% 0%; }
}

/* Toast */
.download-toast{
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15,23,42,0.95);
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 18px 40px rgba(0,0,0,0.22);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 1000;
  font-weight: 650;
}

.download-toast.show{ opacity: 1; }

/* Overlays / modals */
.overlay{
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.68);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 2000;
}

.modal{
  width: min(560px, 100%);
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,0.08);
  box-shadow: 0 26px 65px rgba(0,0,0,0.26);
  overflow: hidden;
}

.modal-head{
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(54,208,199,0.18), rgba(15,23,42,0.05));
  border-bottom: 1px solid rgba(15,23,42,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-head h3{
  margin: 0;
  font-size: 1.02rem;
  font-weight: 900;
  color: var(--navy);
}

.modal-body{
  padding: 16px;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.55;
}

.steps{
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.step{
  padding: 12px;
  background: #fbfcfe;
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.step-num{
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(54,208,199,0.18);
  color: var(--navy);
  border: 1px solid rgba(54,208,199,0.32);
  display: grid;
  place-items: center;
  font-weight: 900;
  flex: 0 0 auto;
}

/* Shared content styles (home/support/contact/privacy) */
.content{
  padding: 18px;
}

.content h2{
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 1.35rem;
  font-weight: 900;
}

.content p{
  margin: 0 0 12px;
  line-height: 1.6;
  color: var(--text);
}

.callout{
  background: #fbfcfe;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  line-height: 1.55;
  color: var(--text);
}

.bullets, .list{
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.pillrow{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: #fbfcfe;
  border: 1px solid var(--border);
  color: var(--navy);
  text-decoration: none;
  font-weight: 800;
}

.pill:hover{
  border-color: rgba(54,208,199,0.55);
}

/* Footer */
.footer{
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer a{
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px solid rgba(15,23,42,0.15);
}

.footer a:hover{
  border-bottom-color: rgba(54,208,199,0.85);
}

.footer-right{
  display: inline-flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Responsive tweaks */
@media (max-width: 860px){
  .viewerbar{ grid-template-columns: 1fr; }
  .actions{ justify-content: flex-start; }
  .brand-text .tagline{ display: none; }
}

@media (max-width: 520px){
  body{ padding: 14px; }
  .topbar{ padding: 14px; }
  .viewerbar{ padding: 12px; }
  .btn{ height: 40px; padding: 0 12px; border-radius: 12px; }
  .actions{ gap: 8px; }
  .pdf-frame{ height: clamp(460px, calc(100vh - 300px), 820px); }
}
