/* ============================================================================
   GIG eBook Modal — styles
   Uses the GIG brand palette. If your pages already define these custom
   properties (:root{--navy …}) they will be inherited; the fallbacks here
   keep the modal correct even on pages that don't.
   ============================================================================ */
:root {
  --gig-navy:        #0D1F3C;
  --gig-navy-deep:   #081428;
  --gig-navy-mid:    #122850;
  --gig-gold:        #B8963E;
  --gig-gold-light:  #D4AF6A;
  --gig-mint:        #6FF0C8;
}

.ebook-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 20, 40, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.ebook-modal-overlay.is-open { opacity: 1; visibility: visible; }

.ebook-modal {
  position: relative;
  width: 100%;
  max-width: 720px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(8, 20, 40, 0.5);
  transform: translateY(16px) scale(.98);
  transition: transform .3s cubic-bezier(.2,.8,.2,1);
}
.ebook-modal-overlay.is-open .ebook-modal { transform: translateY(0) scale(1); }

.ebook-modal-close {
  position: absolute;
  top: 12px; right: 14px;
  width: 34px; height: 34px;
  border: none;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  z-index: 3;
  transition: background .2s ease;
}
.ebook-modal-close:hover { background: rgba(255,255,255,.3); }

.ebook-modal-grid {
  display: grid;
  grid-template-columns: 40% 60%;
}

/* Cover panel */
.ebook-modal-cover {
  position: relative;
  background: linear-gradient(160deg, var(--gig-navy-mid), var(--gig-navy-deep));
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ebook-modal-cover img {
  width: 100%;
  max-width: 200px;
  border-radius: 4px;
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
  border: 1px solid rgba(212,175,106,.35);
}
.ebook-modal-series-tag {
  margin-top: 16px;
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gig-gold-light);
  text-align: center;
  font-weight: 700;
}

/* Body panel */
.ebook-modal-body {
  padding: 34px 32px 30px;
  display: flex;
  flex-direction: column;
}
.ebook-modal-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--gig-gold);
  margin-bottom: 8px;
}
.ebook-modal-title {
  font-size: 22px;
  line-height: 1.2;
  color: var(--gig-navy);
  margin: 0 0 10px;
  font-weight: 800;
}
.ebook-modal-blurb {
  font-size: 14px;
  line-height: 1.5;
  color: #41506a;
  margin: 0 0 20px;
}

.ebook-field { display: block; margin-bottom: 14px; }
.ebook-field span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--gig-navy-mid);
  margin-bottom: 5px;
}
.ebook-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  font-size: 15px;
  border: 1.5px solid #d8dee8;
  border-radius: 8px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.ebook-field input:focus {
  outline: none;
  border-color: var(--gig-gold);
  box-shadow: 0 0 0 3px rgba(184,150,62,.15);
}

.ebook-submit {
  width: 100%;
  padding: 14px;
  margin-top: 4px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--gig-navy-deep);
  background: linear-gradient(135deg, var(--gig-gold-light), var(--gig-gold));
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease;
}
.ebook-submit:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(184,150,62,.35); }
.ebook-submit:disabled { opacity: .65; cursor: default; transform: none; box-shadow: none; }

.ebook-privacy { font-size: 11px; color: #8493a8; margin: 12px 0 0; text-align: center; }
.ebook-error   { font-size: 13px; color: #c0392b; margin: 10px 0 0; min-height: 16px; }

/* Success state */
.ebook-success { text-align: center; padding: 10px 0; }
.ebook-success-icon {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(111,240,200,.18);
  color: #18a06f;
  font-size: 30px;
  line-height: 56px;
  font-weight: 800;
}
.ebook-success h4 { font-size: 19px; color: var(--gig-navy); margin: 0 0 6px; }
.ebook-success p  { font-size: 14px; color: #41506a; margin: 0 0 18px; }
.ebook-download-btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: var(--gig-navy);
  border-radius: 8px;
  text-decoration: none;
  transition: background .2s ease;
}
.ebook-download-btn:hover { background: var(--gig-navy-mid); }

/* Mobile */
@media (max-width: 600px) {
  .ebook-modal-grid { grid-template-columns: 1fr; }
  .ebook-modal-cover { padding: 22px; }
  .ebook-modal-cover img { max-width: 140px; }
  .ebook-modal-body { padding: 24px 22px; }
  .ebook-modal-title { font-size: 19px; }
}

/* ============================================================================
   eBook Series grid (research.html section)
   ============================================================================ */
.ebook-series-section {
  padding: 64px 0;
  background: linear-gradient(180deg, var(--gig-navy) 0%, var(--gig-navy-deep) 100%);
}
.ebook-series-inner { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.ebook-series-head { text-align: center; margin-bottom: 44px; }
.ebook-series-eyebrow {
  font-size: 12px; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gig-gold); margin-bottom: 12px;
}
.ebook-series-title {
  font-size: 34px; line-height: 1.15; color: #fff; margin: 0 0 14px; font-weight: 800;
}
.ebook-series-sub {
  font-size: 16px; line-height: 1.55; color: var(--gig-gold-light);
  max-width: 680px; margin: 0 auto;
}
.ebook-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 22px;
}
.ebook-card {
  background: var(--gig-navy-mid);
  border: 1px solid rgba(212,175,106,.22);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.ebook-card:hover {
  transform: translateY(-6px);
  border-color: var(--gig-gold);
  box-shadow: 0 18px 40px rgba(0,0,0,.4);
}
.ebook-card-cover {
  position: relative;
  aspect-ratio: 600 / 848;
  overflow: hidden;
  background: var(--gig-navy-deep);
}
.ebook-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ebook-card-num {
  position: absolute; top: 10px; left: 10px;
  width: 26px; height: 26px; line-height: 26px;
  text-align: center; border-radius: 50%;
  background: var(--gig-gold); color: var(--gig-navy-deep);
  font-size: 12px; font-weight: 800;
}
.ebook-card-body { padding: 14px 14px 18px; flex: 1; display: flex; flex-direction: column; }
.ebook-card-title {
  font-size: 14px; font-weight: 800; color: #fff; line-height: 1.25; margin: 0 0 6px;
}
.ebook-card-icp {
  font-size: 11px; color: var(--gig-gold-light); margin: 0 0 12px;
}
.ebook-card-cta {
  margin-top: auto;
  font-size: 12px; font-weight: 800; letter-spacing: .04em;
  color: var(--gig-navy-deep);
  background: linear-gradient(135deg, var(--gig-gold-light), var(--gig-gold));
  text-align: center;
  padding: 9px;
  border-radius: 6px;
}

@media (max-width: 1024px) {
  .ebook-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .ebook-grid { grid-template-columns: repeat(2, 1fr); }
  .ebook-series-title { font-size: 26px; }
}

/* ── FIELD VALIDATION ERRORS ──────────────────────────────────────────── */
.ebook-field-err {
  display: block;
  font-size: 11px;
  color: #C0392B;
  margin-top: 4px;
  min-height: 16px;
  line-height: 1.4;
}
.ebook-field input:focus {
  outline: none;
  border-color: var(--gold, #D4AF37) !important;
  box-shadow: 0 0 0 2px rgba(212,175,55,.15);
}

/* ── CONSENT BLOCK ────────────────────────────────────────────────────── */
.gig-consent-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.gig-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  cursor: pointer;
}
.gig-consent-checkbox {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: #D4AF37;
  width: 16px;
  height: 16px;
}

/* ── DATA MODIFY PANEL ────────────────────────────────────────────────── */
#gig-data-panel {
  position: fixed;
  inset: 0;
  z-index: 9997;
  pointer-events: none;
}
#gig-data-panel[aria-hidden="false"] {
  pointer-events: all;
}
#gig-data-panel-inner input:focus {
  outline: none;
  border-color: #D4AF37 !important;
  box-shadow: 0 0 0 2px rgba(212,175,55,.15);
}
