/* Guest account sign-in pop-up shown before checkout. */
.ga-overlay { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(15, 23, 42, .55); backdrop-filter: blur(6px); animation: ga-fade .2s ease; }
.ga-overlay[hidden] { display: none; }
.ga-dialog { position: relative; display: grid; width: min(920px, 100%); max-height: calc(100dvh - 40px); overflow: hidden auto; border-radius: 28px; background: #fff; box-shadow: 0 40px 90px -30px rgba(15, 23, 42, .55), 0 0 0 1px rgba(15, 23, 42, .06); animation: ga-rise .32s cubic-bezier(.2, .9, .3, 1.1); font-family: inherit; }
@media (min-width: 768px) { .ga-dialog { grid-template-columns: minmax(0, 43fr) minmax(0, 57fr); overflow: hidden; } }
@keyframes ga-fade { from { opacity: 0; } }
@keyframes ga-rise { from { opacity: 0; transform: translateY(18px) scale(.98); } }

.ga-close { position: absolute; top: 16px; right: 16px; z-index: 2; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #e2e8f0; border-radius: 50%; background: rgba(255, 255, 255, .9); color: #64748b; cursor: pointer; transition: all .15s ease; }
.ga-close:hover { border-color: #cbd5e1; color: #0f172a; transform: rotate(90deg); }
.ga-close svg { width: 16px; height: 16px; }

/* Left: file ready */
.ga-file-panel { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 28px 22px; overflow: hidden; background: radial-gradient(circle at 15% 0%, #dbeafe 0, transparent 45%), radial-gradient(circle at 100% 100%, #ede9fe 0, transparent 40%), linear-gradient(160deg, #f5f9ff, #f8fafc); text-align: center; }
.ga-file-panel::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(37, 99, 235, .08) 1px, transparent 1px); background-size: 18px 18px; mask-image: linear-gradient(to bottom, #000, transparent 70%); pointer-events: none; }
.ga-file-panel > * { position: relative; }
@media (min-width: 768px) { .ga-file-panel { border-right: 1px solid #e8eef8; padding: 44px 32px 24px; } }
.ga-ready-mark { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 8px; border-radius: 50%; background: #ecfdf5; color: #059669; box-shadow: 0 0 0 7px rgba(16, 185, 129, .1), 0 0 0 1px rgba(16, 185, 129, .35) inset; }
.ga-ready-mark svg { width: 26px; height: 26px; }
.ga-ready-mark svg { animation: ga-pop .45s .2s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes ga-pop { from { opacity: 0; transform: scale(.4); } }
.ga-file-title { color: #0f172a; font-size: 23px; font-weight: 800; letter-spacing: -.02em; }
.ga-file-copy { color: #64748b; font-size: 14px; }

.ga-file-card { display: flex; align-items: center; gap: 18px; width: 100%; margin-top: 18px; border: 1px solid #e2e8f0; border-radius: 20px; padding: 18px; background: rgba(255, 255, 255, .92); box-shadow: 0 18px 40px -26px rgba(30, 64, 175, .45); text-align: left; }
.ga-paper-stack { position: relative; flex: none; width: 104px; height: 128px; }
.ga-paper { position: absolute; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; }
.ga-paper-back { inset: 10px -8px -6px 14px; transform: rotate(5deg); background: #f1f5f9; }
.ga-paper-mid { inset: 6px -4px -3px 8px; transform: rotate(2.5deg); background: #f8fafc; }
.ga-paper-front { inset: 0 6px 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 10px 24px -14px rgba(15, 23, 42, .45); animation: ga-float 4s ease-in-out infinite; }
@keyframes ga-float { 50% { transform: translateY(-3px); } }
.ga-service-image { width: 58px; height: 58px; object-fit: contain; }
.ga-service-icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; background: linear-gradient(140deg, #eff6ff, #e0e7ff); color: #2563eb; }
.ga-service-icon svg, .ga-service-icon i { width: 26px; height: 26px; }
.ga-paper-lines { display: grid; gap: 4px; width: 56%; }
.ga-paper-lines span { height: 3px; border-radius: 3px; background: #e2e8f0; }
.ga-paper-lines span:last-child { width: 60%; }
.ga-format-badge { position: absolute; top: -8px; left: -10px; border-radius: 8px; padding: 4px 8px; background: #ef4444; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .03em; box-shadow: 0 8px 16px -8px rgba(239, 68, 68, .9); }
.ga-format-badge[data-ga-format="DOCX"], .ga-format-badge[data-ga-format="DOC"], .ga-format-badge[data-ga-format="RTF"], .ga-format-badge[data-ga-format="ODT"] { background: #2563eb; box-shadow: 0 8px 16px -8px rgba(37, 99, 235, .9); }
.ga-format-badge[data-ga-format="XLSX"], .ga-format-badge[data-ga-format="CSV"], .ga-format-badge[data-ga-format="ODS"] { background: #16a34a; box-shadow: 0 8px 16px -8px rgba(22, 163, 74, .9); }
.ga-format-badge[data-ga-format="PPTX"], .ga-format-badge[data-ga-format="ODP"] { background: #ea580c; box-shadow: 0 8px 16px -8px rgba(234, 88, 12, .9); }
.ga-format-badge[data-ga-format="JPG"], .ga-format-badge[data-ga-format="JPEG"], .ga-format-badge[data-ga-format="PNG"], .ga-format-badge[data-ga-format="WEBP"], .ga-format-badge[data-ga-format="SVG"] { background: #7c3aed; box-shadow: 0 8px 16px -8px rgba(124, 58, 237, .9); }
.ga-format-badge[data-ga-format="ZIP"], .ga-format-badge[data-ga-format="TXT"], .ga-format-badge[data-ga-format="HTML"], .ga-format-badge[data-ga-format="EPUB"], .ga-format-badge[data-ga-format="MP3"] { background: #334155; box-shadow: 0 8px 16px -8px rgba(51, 65, 85, .9); }
.ga-file-info { display: grid; gap: 8px; min-width: 0; }
.ga-file-name { color: #0f172a; font-size: 15px; font-weight: 750; line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ga-file-meta { color: #64748b; font-size: 13px; }
.ga-ready-pill { display: inline-flex; align-items: center; gap: 6px; justify-self: start; border-radius: 999px; padding: 5px 11px; background: #ecfdf5; color: #047857; font-size: 13px; font-weight: 700; }
.ga-ready-pill svg { width: 14px; height: 14px; }

.ga-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; width: 100%; margin: auto 0 0; padding: 18px 0 0; list-style: none; border-top: 1px dashed #dbe4f0; }
.ga-file-card + .ga-trust { margin-top: 22px; }
.ga-trust li { display: inline-flex; align-items: center; gap: 6px; color: #475569; font-size: 12px; font-weight: 600; }
.ga-trust svg { width: 16px; height: 16px; color: #059669; }

/* Right: account */
.ga-account-panel { display: flex; flex-direction: column; gap: 14px; padding: 30px 26px 26px; }
@media (min-width: 768px) { .ga-account-panel { justify-content: center; padding: 48px 44px 34px; } }
.ga-title { padding-right: 34px; color: #0f172a; font-size: 26px; font-weight: 800; line-height: 1.2; letter-spacing: -.02em; }
.ga-subtitle { margin-top: -6px; color: #64748b; font-size: 14px; }
.ga-social { display: grid; gap: 10px; margin-top: 6px; }
.ga-social-btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; color: #0f172a; font-size: 15px; font-weight: 700; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.ga-social-btn:hover { border-color: #cbd5e1; box-shadow: 0 10px 24px -16px rgba(15, 23, 42, .5); transform: translateY(-1px); }
.ga-social-btn:focus-visible, .ga-submit:focus-visible, .ga-close:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
.ga-social-btn svg { width: 20px; height: 20px; }
.ga-divider { display: flex; align-items: center; gap: 12px; color: #94a3b8; font-size: 12px; font-weight: 600; }
.ga-divider::before, .ga-divider::after { content: ""; flex: 1; height: 1px; background: #e2e8f0; }
.ga-form { display: grid; gap: 8px; }
.ga-label { color: #334155; font-size: 13px; font-weight: 700; }
.ga-input { display: flex; align-items: center; gap: 10px; min-height: 52px; border: 1px solid #dbe3ee; border-radius: 14px; padding: 0 14px; background: #f8fafc; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.ga-input:focus-within { border-color: #60a5fa; background: #fff; box-shadow: 0 0 0 4px #dbeafe; }
.ga-input svg { flex: none; width: 19px; height: 19px; color: #94a3b8; }
.ga-input input { flex: 1; min-width: 0; border: 0; background: transparent; color: #0f172a; font-size: 15px; outline: none; box-shadow: none; padding: 0; }
.ga-password { display: grid; gap: 8px; margin-top: 4px; animation: ga-fade .2s ease; }
.ga-password[hidden], .ga-error[hidden], [data-ga-busy][hidden], [data-ga-idle][hidden] { display: none; }
.ga-forgot { justify-self: end; color: #1d4ed8; font-size: 12px; font-weight: 700; }
.ga-error { border-radius: 12px; padding: 10px 12px; background: #fff7ed; color: #b45309; font-size: 13px; line-height: 1.45; box-shadow: inset 0 0 0 1px #fed7aa; }
.ga-submit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; margin-top: 8px; border: 0; border-radius: 14px; background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff; font-size: 16px; font-weight: 750; cursor: pointer; box-shadow: 0 16px 30px -14px rgba(37, 99, 235, .9); transition: transform .15s ease, box-shadow .15s ease, filter .15s ease; }
.ga-submit:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 20px 36px -14px rgba(37, 99, 235, .95); }
.ga-submit:disabled { cursor: wait; opacity: .75; transform: none; }
.ga-submit-icon { display: inline-flex; transition: transform .15s ease; }
.ga-submit-icon svg { width: 18px; height: 18px; }
.ga-submit:hover .ga-submit-icon { transform: translateX(3px); }
.ga-submit [data-ga-busy] { display: inline-flex; align-items: center; gap: 8px; }
.ga-submit [data-ga-busy][hidden], .ga-submit [data-ga-idle][hidden] { display: none; }
.ga-spinner { display: inline-flex; }
.ga-spinner svg { width: 18px; height: 18px; animation: ga-spin .8s linear infinite; }
@keyframes ga-spin { to { transform: rotate(360deg); } }
.ga-terms { color: #64748b; font-size: 12px; line-height: 1.5; text-align: center; }
.ga-terms a { color: #334155; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 767px) {
  .ga-overlay { align-items: flex-end; padding: 0; }
  .ga-dialog { max-height: 94dvh; border-radius: 26px 26px 0 0; animation-name: ga-sheet; }
  .ga-file-panel { padding: 26px 20px 18px; }
  .ga-ready-mark { width: 44px; height: 44px; }
  .ga-file-title { font-size: 20px; }
  .ga-file-card { margin-top: 12px; padding: 14px; }
  .ga-paper-stack { width: 76px; height: 94px; }
  .ga-service-image { width: 42px; height: 42px; }
  .ga-title { font-size: 22px; }
}
@keyframes ga-sheet { from { transform: translateY(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ga-overlay, .ga-dialog, .ga-paper-front, .ga-ready-mark svg { animation: none; } }
