/* AJIT Cookie Consent — front-office styles (v0.2.3)
   AJIT blue gradient: #2472b8 -> #2b87da */

/* Root = full-screen positioning context. Transparent to clicks by default;
   only the card catches events. Hard gate adds an overlay that DOES catch clicks. */
.ajitcc-root {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0;
  z-index: 2147483000;
  pointer-events: none;
}

/* dimming overlay only present in hard-gate mode */
.ajitcc-overlay {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(1px);
  pointer-events: auto;
  z-index: 0;
}

.ajitcc-card {
  position: absolute;
  pointer-events: auto;
  z-index: 1;
  width: min(440px, calc(100vw - 32px));
  background: #fff;
  color: #1f2937;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .28);
  padding: 20px 22px;
  font: 14px/1.55 -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---- positions (box / cloud) ---- */
.ajitcc-pos-center       .ajitcc-card { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.ajitcc-pos-top          .ajitcc-card { top: 20px;  left: 50%; transform: translateX(-50%); }
.ajitcc-pos-bottom       .ajitcc-card { bottom: 20px; left: 50%; transform: translateX(-50%); }
.ajitcc-pos-top-left     .ajitcc-card { top: 20px;  left: 20px; }
.ajitcc-pos-top-right    .ajitcc-card { top: 20px;  right: 20px; }
.ajitcc-pos-bottom-left  .ajitcc-card { bottom: 20px; left: 20px; }
.ajitcc-pos-bottom-right .ajitcc-card { bottom: 20px; right: 20px; }

/* ---- layout: cloud (softer, more rounded) ---- */
.ajitcc-layout-cloud .ajitcc-card { border-radius: 18px; box-shadow: 0 16px 48px rgba(15, 23, 42, .3); }

/* ---- layout: bar (full width, pinned to an edge) ---- */
.ajitcc-layout-bar .ajitcc-card {
  left: 0; right: 0; width: 100%; max-width: 100%;
  border-radius: 0; transform: none;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 22px;
}
.ajitcc-layout-bar .ajitcc-title { flex: 0 0 auto; margin: 0; }
.ajitcc-layout-bar .ajitcc-body  { flex: 1 1 260px; margin: 0; }
.ajitcc-layout-bar .ajitcc-prefs { flex: 1 1 100%; }
.ajitcc-layout-bar .ajitcc-actions { flex: 0 0 auto; }
/* bar pins to top or bottom edge; corners collapse to that edge */
.ajitcc-layout-bar.ajitcc-pos-top .ajitcc-card,
.ajitcc-layout-bar.ajitcc-pos-top-left .ajitcc-card,
.ajitcc-layout-bar.ajitcc-pos-top-right .ajitcc-card { top: 0; bottom: auto; }
.ajitcc-layout-bar.ajitcc-pos-bottom .ajitcc-card,
.ajitcc-layout-bar.ajitcc-pos-bottom-left .ajitcc-card,
.ajitcc-layout-bar.ajitcc-pos-bottom-right .ajitcc-card,
.ajitcc-layout-bar.ajitcc-pos-center .ajitcc-card { bottom: 0; top: auto; }

.ajitcc-title { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.ajitcc-body { margin: 0 0 14px; color: #374151; }

.ajitcc-prefs { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 14px; }
.ajitcc-grp { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ajitcc-grp input[disabled] { accent-color: #9ca3af; }
.ajitcc-grp-label { font-weight: 600; }
.ajitcc-grp-desc { flex: 1 1 100%; margin-left: 24px; color: #6b7280; font-size: 12.5px; }

.ajitcc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ajitcc-btn {
  appearance: none; cursor: pointer;
  border: 2px solid transparent;      /* keeps accept/reject the same height */
  padding: 9px 16px; border-radius: 8px;
  font-size: 14px; font-weight: 600;
}
.ajitcc-accept {
  color: #fff;
  background: linear-gradient(90deg, #2472b8 0%, #2b87da 100%);
  flex: 1 1 auto;
}
/* GDPR / CNIL: reject must be as prominent as accept — same size + weight, same
   colour family, just outlined instead of filled (not a muted grey). */
.ajitcc-reject {
  background: #fff; color: #2472b8; border-color: #2472b8;
  flex: 1 1 auto;
}
.ajitcc-savebtn {
  color: #fff;
  background: linear-gradient(90deg, #2472b8 0%, #2b87da 100%);
  flex: 1 1 100%;
}
.ajitcc-link {
  background: transparent; color: #2472b8;
  text-decoration: underline; padding-left: 4px; padding-right: 4px;
  flex: 1 1 100%; text-align: center;
}

/* small reopen chip after consent */
.ajitcc-reopen {
  position: fixed; left: 16px; bottom: 16px; z-index: 2147482000;
  appearance: none; border: 0; cursor: pointer;
  padding: 8px 14px; border-radius: 20px;
  color: #fff; font: 600 13px/1 -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: linear-gradient(90deg, #2472b8 0%, #2b87da 100%);
  box-shadow: 0 4px 14px rgba(36, 114, 184, .4);
}

@media (max-width: 520px) {
  /* box/cloud: full-width-ish and glued near the bottom edge on phones */
  .ajitcc-layout-box .ajitcc-card,
  .ajitcc-layout-cloud .ajitcc-card {
    left: 8px; right: 8px; width: auto; max-width: none; transform: none;
  }
  .ajitcc-pos-center .ajitcc-card { top: auto; bottom: 8px; }
  .ajitcc-pos-top .ajitcc-card,
  .ajitcc-pos-top-left .ajitcc-card,
  .ajitcc-pos-top-right .ajitcc-card { top: 8px; }
  .ajitcc-pos-bottom .ajitcc-card,
  .ajitcc-pos-bottom-left .ajitcc-card,
  .ajitcc-pos-bottom-right .ajitcc-card { bottom: 8px; }
  .ajitcc-layout-bar .ajitcc-card { left: 0; right: 0; }
}
