/*
 * CIPA Consent Guard banner styles — themed to Velare Remodeling & Restoration.
 * Tokens mirror styles/global.css so the banner matches the site.
 */
:root {
  --cg-bg: #fbf7f0;              /* --surface */
  --cg-text: #2f2a24;           /* --text */
  --cg-muted: #6c6258;          /* --muted */
  --cg-primary: #626b58;        /* --accent-strong (accept button / links) */
  --cg-primary-text: #ffffff;
  --cg-border: #d9ccbc;         /* --border */
  --cg-radius: 12px;            /* --radius-lg */
  --cg-shadow: 0 24px 58px rgba(44, 31, 20, 0.13);  /* --shadow-lift */
  --cg-font: "Plus Jakarta Sans", "Segoe UI", "Helvetica Neue", Arial, 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; }
.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: calc(var(--cg-radius) - 4px);
  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(0,0,0,.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-family: "Fraunces", Georgia, "Times New Roman", serif; }
.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: 999px;
  background: var(--cg-bg); color: var(--cg-muted);
  border: 1px solid var(--cg-border); box-shadow: var(--cg-shadow); opacity: .85;
}
.cg-reopen:hover { opacity: 1; }

/* A gated embed has no src until functional consent is granted — hide the empty
   frame so only the placeholder shows until then. */
iframe[data-consent-src]:not([src]) { display: none; }

/* Placeholder shown in place of a gated third-party embed (e.g. the Google Maps
   coverage map) until the visitor allows functional cookies. */
.cg-embed-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center;
  width: 100%; height: 100%; min-height: 320px;
  padding: 24px;
  background: var(--cg-bg); color: var(--cg-muted);
  border: 1px dashed var(--cg-border); border-radius: var(--cg-radius);
  font-family: var(--cg-font);
}
.cg-embed-placeholder p { margin: 0; font-size: 14px; max-width: 340px; line-height: 1.5; }
.cg-embed-enable {
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 9px 18px; border-radius: calc(var(--cg-radius) - 4px);
  background: var(--cg-primary); color: var(--cg-primary-text);
  border: 1px solid var(--cg-primary);
}
.cg-embed-enable:hover { opacity: .9; }

@media (max-width: 560px) {
  .cg-inner { flex-direction: column; align-items: stretch; }
  .cg-actions { justify-content: stretch; }
  .cg-btn { flex: 1; }
}
