/* ============================================
   API KEY MODAL — Lionheart Energy branded
   ============================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 37, 51, .88);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-card {
  background: var(--lh-white);
  border-radius: 16px;
  width: 440px;
  max-width: 92vw;
  box-shadow: 0 24px 64px rgba(0,0,0,.35), 0 0 0 1px rgba(197,165,90,.15);
  overflow: hidden;
}

/* ---- Modal header ---- */
.modal-header {
  background: linear-gradient(145deg, var(--lh-navy) 0%, var(--lh-navy-deep) 100%);
  padding: 36px 36px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* Radiating lines motif (from logo) */
.modal-header::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(
    rgba(197,165,90,.03) 0deg,
    transparent 2deg,
    transparent 5deg
  );
  border-radius: 50%;
  pointer-events: none;
}

.modal-logo {
  width: 100px;
  height: 60px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.modal-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.modal-header h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--lh-gold);
  margin-bottom: 4px;
  letter-spacing: .08em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}
.modal-subtitle {
  font-size: 13px;
  color: rgba(255,255,255,.45);
  position: relative;
  z-index: 1;
  letter-spacing: .03em;
}

/* Gold accent bar */
.modal-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--lh-gold) 0%, var(--lh-gold-hover) 50%, transparent 100%);
  z-index: 2;
}

/* ---- Modal body ---- */
.modal-body {
  padding: 28px 36px;
}
.modal-body label {
  font-weight: 600;
  font-size: 12px;
  color: var(--lh-gray-800);
  margin-bottom: 4px;
  display: block;
  letter-spacing: .01em;
}
.modal-hint {
  font-size: 11px;
  color: var(--lh-gray-400);
  margin-bottom: 12px;
  line-height: 1.6;
}
.modal-hint a {
  color: var(--lh-gold-dark);
  text-decoration: none;
  font-weight: 500;
  transition: color .15s;
}
.modal-hint a:hover {
  color: var(--lh-gold);
  text-decoration: underline;
}

.modal-body input[type="text"] {
  width: 100%;
  height: 44px;
  border: 1.5px solid var(--lh-gray-200);
  border-radius: var(--radius);
  padding: 0 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--lh-gray-800);
  background: var(--lh-gray-50);
  outline: none;
  transition: all .2s ease;
}
.modal-body input:focus {
  border-color: var(--lh-gold);
  background: var(--lh-white);
  box-shadow: var(--shadow-gold);
}

/* ---- Modal footer ---- */
.modal-footer {
  padding: 8px 36px 28px;
  display: flex;
  justify-content: flex-end;
}
.modal-footer .btn-gold {
  width: 100%;
  height: 46px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ---- Google Sign-In Button ---- */
.btn-google {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  border: 1.5px solid var(--lh-gray-200);
  border-radius: var(--radius);
  background: var(--lh-white);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--lh-gray-800);
  cursor: pointer;
  transition: all .2s ease;
}
.btn-google:hover {
  border-color: var(--lh-gold);
  box-shadow: 0 2px 8px rgba(197,165,90,.15);
}
.btn-google svg { flex-shrink: 0; }

/* ---- Skip Login (dev) ---- */
.btn-skip-login {
  display: block;
  margin: 16px auto 0;
  padding: 8px 20px;
  background: none;
  border: 1px dashed var(--lh-gray-300, #d1d5db);
  border-radius: var(--radius, 8px);
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--lh-gray-400, #9ca3af);
  cursor: pointer;
  transition: all .15s ease;
}
.btn-skip-login:hover {
  border-color: var(--lh-gray-400, #9ca3af);
  color: var(--lh-gray-600, #4b5563);
}

/* ---- Login error message ---- */
.login-error {
  color: #dc2626;
  font-size: 12px;
  margin-top: 14px;
  line-height: 1.5;
}

/* ===========================
   PDF TEMPLATE (off-screen)
   =========================== */
.pdf-template {
  position: fixed;
  left: -9999px;
  top: -9999px;
  width: 792px;
  height: 612px;
  background: #fff;
  z-index: -1;
}
