/*
 * CIPA Consent Guard banner styles — themed to Pinnacle Air Control.
 * Variables mapped from styles/tokens.css (brand red, Manrope, 2px radius, hairline).
 */
:root {
  --cg-bg: #ffffff;              /* --paper */
  --cg-text: #1a1a1a;            /* --ink */
  --cg-muted: #5c5c5c;           /* --ink-muted */
  --cg-primary: #e92a3b;         /* --pinnacle-red — accept button / links */
  --cg-primary-text: #ffffff;
  --cg-border: #e8e5df;          /* --hairline */
  --cg-radius: 2px;              /* --radius-md — sharp corners to match the site */
  --cg-shadow: 0 -1px 0 #e8e5df, 0 6px 22px rgba(14, 22, 33, 0.10); /* thin top hairline + soft lift (no heavy drop shadow) */
  --cg-font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --cg-z: 2147483000;
}

.cg-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px;
  z-index: var(--cg-z);
  background: var(--cg-bg); color: var(--cg-text);
  border: 1px solid var(--cg-border); border-radius: var(--cg-radius);
  box-shadow: var(--cg-shadow); font-family: var(--cg-font);
  max-width: 920px; margin: 0 auto;
}
.cg-inner {
  display: flex; gap: 20px; align-items: center; justify-content: space-between;
  padding: 16px 46px 16px 20px; flex-wrap: wrap;
}
.cg-close {
  position: absolute; top: 6px; right: 8px;
  width: 30px; height: 30px; line-height: 1; font-size: 22px;
  display: grid; place-items: center;
  background: transparent; border: 0; color: var(--cg-muted);
  cursor: pointer; border-radius: var(--cg-radius);
}
.cg-close:hover { color: var(--cg-text); }
.cg-text strong { display: block; font-size: 15px; margin-bottom: 2px; font-weight: 700; }
.cg-text p { margin: 0; font-size: 13px; color: var(--cg-muted); max-width: 560px; line-height: 1.5; }
.cg-link { color: var(--cg-primary); text-decoration: underline; }

.cg-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cg-btn {
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 9px 16px; border-radius: var(--cg-radius);
  border: 1px solid var(--cg-border); background: transparent; color: var(--cg-text);
  transition: opacity .15s ease;
}
.cg-btn:hover { opacity: .85; }
.cg-accept { background: var(--cg-primary); color: var(--cg-primary-text); border-color: var(--cg-primary); }
.cg-decline, .cg-prefs { background: transparent; }

.cg-modal {
  position: fixed; inset: 0; z-index: calc(var(--cg-z) + 1);
  background: rgba(14, 22, 33, .45); display: flex; align-items: center; justify-content: center;
  padding: 16px; font-family: var(--cg-font);
}
.cg-modal-inner {
  background: var(--cg-bg); color: var(--cg-text);
  border-radius: var(--cg-radius); box-shadow: var(--cg-shadow);
  max-width: 520px; width: 100%; padding: 24px; max-height: 85vh; overflow-y: auto;
  position: relative;
}
.cg-modal-close {
  position: absolute; top: 12px; right: 14px;
  width: 30px; height: 30px; line-height: 1; font-size: 22px;
  display: grid; place-items: center;
  background: transparent; border: 0; color: var(--cg-muted); cursor: pointer;
}
.cg-modal-close:hover { color: var(--cg-text); }
.cg-modal-inner h2 { margin: 0 0 16px; font-size: 18px; font-weight: 800; }
.cg-rows { display: flex; flex-direction: column; gap: 4px; }
.cg-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--cg-border);
}
.cg-row-txt { display: flex; flex-direction: column; }
.cg-row-txt strong { font-size: 14px; }
.cg-row-txt span { font-size: 12px; color: var(--cg-muted); margin-top: 2px; }
.cg-row input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--cg-primary); }
.cg-row input:disabled { opacity: .5; cursor: not-allowed; }
.cg-modal-inner .cg-actions { margin-top: 20px; justify-content: flex-end; }
.cg-save { background: var(--cg-primary); color: var(--cg-primary-text); border-color: var(--cg-primary); }

.cg-reopen {
  position: fixed; left: 16px; bottom: 16px; z-index: calc(var(--cg-z) - 1);
  font-family: var(--cg-font); font-size: 12px; font-weight: 600; cursor: pointer;
  padding: 8px 12px; border-radius: var(--cg-radius);
  background: var(--cg-bg); color: var(--cg-muted);
  border: 1px solid var(--cg-border); box-shadow: var(--cg-shadow); opacity: .9;
}
.cg-reopen:hover { opacity: 1; }

/* Placeholder shown in place of a consent-gated embed (e.g. Google Map) until accepted */
.cg-embed-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center; padding: 32px 20px;
  background: #f2f4f7; color: var(--cg-muted);
  border: 1px solid var(--cg-border); border-radius: var(--cg-radius);
  font-family: var(--cg-font); font-size: 14px; min-height: 200px;
}
.cg-embed-placeholder p { margin: 0; max-width: 42ch; line-height: 1.5; }
.cg-embed-btn {
  font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  padding: 9px 16px; border-radius: var(--cg-radius);
  background: var(--cg-primary); color: var(--cg-primary-text); border: 1px solid var(--cg-primary);
}
.cg-embed-btn:hover { opacity: .9; }

/* Lift the banner + re-open control above the fixed mobile call/quote bar */
@media (max-width: 768px) {
  body.has-mobile-cta .cg-banner { bottom: 84px; }
  body.has-mobile-cta .cg-reopen { bottom: 84px; }
}
@media (max-width: 560px) {
  .cg-inner { flex-direction: column; align-items: stretch; }
  .cg-actions { justify-content: stretch; }
  .cg-btn { flex: 1; }
}
