/* =========================================================
   Gulecha CPA — cookie consent popup, preference centre and cookie button
   Markup is built by assets/js/consent.js.
   ========================================================= */

.cc-root, .cc-root * { box-sizing: border-box; }
.cc-root { font-family: var(--sans); letter-spacing: normal; color: var(--ink-2); }
.cc-root [hidden] { display: none !important; }

.cc-overlay { position: fixed; inset: 0; z-index: 2147483001; background: rgba(5, 20, 14, .45); backdrop-filter: blur(2px); animation: cc-fade .25s var(--ease); }
body.cc-modal-open { overflow: hidden; }

/* ---------- popup ---------- */
.cc-banner {
  position: fixed; left: 24px; bottom: 88px; z-index: 2147483002;
  width: 440px; max-width: calc(100vw - 32px); max-height: calc(100vh - 110px); overflow-y: auto;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 26px 24px; box-shadow: var(--shadow-lg);
  animation: cc-rise .35s var(--ease);
}
.cc-badge { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--mint); color: var(--green); margin-bottom: 14px; }
.cc-badge svg { width: 24px; height: 24px; }
.cc-popup-close { position: absolute; top: 16px; right: 16px; }
.cc-banner .cc-title { padding-right: 32px; }

.cc-title { font-family: var(--serif); font-size: 21px; line-height: 1.25; font-weight: 600; letter-spacing: -.02em; color: var(--ink); margin: 0 0 8px; }
.cc-text { font-size: 14.5px; line-height: 1.65; color: var(--ink-2); margin: 0 0 20px; }
.cc-text a { color: var(--green); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.cc-text a:hover { color: var(--green-700); }

.cc-actions { display: flex; gap: 8px; }
.cc-btn {
  flex: 1 1 auto; height: 44px; padding: 0 14px;
  border: 1.5px solid var(--line-2); border-radius: 999px; background: var(--white);
  font: 700 14px/1 var(--sans); color: var(--ink); white-space: nowrap; cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s, transform .2s var(--ease);
}
.cc-btn:hover { border-color: var(--ink); }
.cc-btn-primary { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 10px 24px -12px rgba(0, 135, 76, .7); }
.cc-btn-primary:hover { background: var(--green-600); border-color: var(--green-600); transform: translateY(-1px); }

.cc-close { width: 34px; height: 34px; border: 0; border-radius: 50%; padding: 0; background: var(--paper); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: background .2s; }
.cc-close:hover { background: var(--mint); color: var(--green-700); }
.cc-close svg { width: 16px; height: 16px; }

.cc-btn:focus-visible, .cc-close:focus-visible, .cc-acc-btn:focus-visible, .cc-more:focus-visible,
.cc-switch input:focus-visible + span, .cc-revisit:focus-visible, .cc-text a:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* ---------- preference centre ---------- */
.cc-modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2147483002;
  width: 780px; max-width: calc(100vw - 32px); max-height: 82vh;
  display: flex; flex-direction: column;
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden;
  animation: cc-fade .25s var(--ease);
}
.cc-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 26px; border-bottom: 1px solid var(--line); }
.cc-modal-head .cc-title { margin: 0; }
.cc-modal-body { overflow-y: auto; padding: 18px 26px 4px; }
.cc-modal-body > .cc-text { margin: 0 0 14px; }
.cc-more { border: 0; background: none; padding: 0; color: var(--green); font: inherit; font-weight: 700; cursor: pointer; }

.cc-acc { border-top: 1px solid var(--line); padding: 16px 0; }
.cc-acc-head { display: flex; align-items: center; gap: 12px; }
.cc-acc-btn { flex: 1; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; cursor: pointer; font: 700 16px/1.5 var(--sans); color: var(--ink); text-align: left; }
.cc-chev { width: 16px; height: 16px; color: var(--green); flex: none; transition: transform .2s var(--ease); }
.cc-acc.open .cc-chev { transform: rotate(90deg); }
.cc-always { font-size: 13px; font-weight: 700; color: var(--green); background: var(--mint); padding: 4px 12px; border-radius: 999px; }
.cc-acc-des { font-size: 14px; line-height: 1.6; color: var(--muted); margin: 6px 0 0 26px; }
.cc-acc-detail { margin: 10px 0 0 26px; padding: 10px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; line-height: 1.5; color: var(--muted); }

.cc-switch { position: relative; width: 44px; height: 24px; flex: none; }
.cc-switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.cc-switch span { position: absolute; inset: 0; border-radius: 24px; background: var(--line-2); transition: background .2s; }
.cc-switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s var(--ease); }
.cc-switch input:checked + span { background: var(--green); }
.cc-switch input:checked + span::after { transform: translateX(20px); }

.cc-modal-foot { display: flex; gap: 8px; padding: 18px 26px; border-top: 1px solid var(--line); background: var(--paper); }
.cc-modal-foot .cc-btn { flex: 1; }
.cc-modal-foot .cc-btn-save { flex: 1.35; }

/* ---------- cookie button ---------- */
.cc-revisit {
  position: fixed; left: 24px; bottom: 24px; z-index: 2147483003;
  width: 50px; height: 50px; border-radius: 50%; border: 1px solid rgba(47, 191, 122, .45); padding: 0;
  background: var(--forest); color: var(--leaf); display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(7, 36, 26, .6); transition: background .2s, transform .2s var(--ease);
}
.cc-revisit svg { width: 24px; height: 24px; }
.cc-revisit:hover { background: var(--green); color: #fff; transform: translateY(-2px); }

@keyframes cc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cc-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- phones ---------- */
@media (max-width: 575px) {
  .cc-banner { left: 16px; right: 16px; bottom: 82px; width: auto; max-width: none; padding: 22px 18px 18px; }
  .cc-popup-close { top: 12px; right: 12px; }
  .cc-actions { flex-wrap: wrap; }
  .cc-actions .cc-btn { flex: 1 1 calc(50% - 4px); }
  .cc-actions .cc-btn-primary { flex-basis: 100%; order: -1; }
  .cc-modal { width: 100%; max-width: 100vw; height: 100%; max-height: 100%; border-radius: 0; }
  .cc-modal-head, .cc-modal-foot { padding: 16px; }
  .cc-modal-body { padding: 14px 16px 4px; }
  .cc-modal-foot { flex-direction: column; }
  .cc-acc-des, .cc-acc-detail { margin-left: 0; }
  .cc-revisit { left: 16px; bottom: 16px; width: 46px; height: 46px; }
  .cc-pref-open .cc-revisit { display: none; }
}
