/* Google Reviews back-office admin: tabs, controls, live preview. PrestaChamps.
   Scoped under .gcr-admin — self-contained, does not leak into the rest of the BO. */
.gcr-admin{--gcr-bg:#f5f6f8;--gcr-panel:#fff;--gcr-line:#e0e3e7;--gcr-ink:#202124;--gcr-sub:#5f6368;--gcr-accent:#1a73e8;--gcr-accent-ink:#fff;--gcr-gold:#fbbc04;--gcr-warn:#d93025;--gcr-radius:10px;box-sizing:border-box;color:var(--gcr-ink);font-size:13px;line-height:1.5}
.gcr-admin *,.gcr-admin *::before,.gcr-admin *::after{box-sizing:border-box}
.gcr-admin h3,.gcr-admin h4{color:var(--gcr-ink);font-weight:600;margin:0 0 12px}
.gcr-admin h3{font-size:16px;padding-bottom:8px;border-bottom:1px solid var(--gcr-line)}
.gcr-admin h4{font-size:14px;margin-top:22px}

/* Tabs */
.gcr-tabs{display:flex;flex-wrap:wrap;gap:4px;list-style:none;margin:0 0 18px;padding:0;border-bottom:2px solid var(--gcr-line)}
.gcr-tab{cursor:pointer;user-select:none;padding:10px 18px;font-weight:600;font-size:13px;color:var(--gcr-sub);background:transparent;border:1px solid transparent;border-bottom:none;border-radius:8px 8px 0 0;margin-bottom:-2px;transition:color .15s ease,background-color .15s ease}
.gcr-tab:hover{color:var(--gcr-ink);background:rgba(26,115,232,.06)}
.gcr-tab-on,.gcr-tab-on:hover{color:var(--gcr-accent);background:var(--gcr-panel);border-color:var(--gcr-line);border-bottom-color:var(--gcr-panel)}

/* Panes: visible by default (no-JS fallback); JS opts into tabbed hiding via .gcr-js */
.gcr-admin.gcr-js .gcr-pane{display:none}
.gcr-admin.gcr-js .gcr-pane-on{display:block;animation:gcr-fade .15s ease}
@keyframes gcr-fade{from{opacity:0}to{opacity:1}}

.gcr-section{background:var(--gcr-panel);border:1px solid var(--gcr-line);border-radius:var(--gcr-radius);padding:20px 22px;margin-bottom:18px}

/* Plain form fields (non-.gcr-controls sections, e.g. Tab 1 and Collect) */
.gcr-field{margin-bottom:16px}
.gcr-field:last-of-type{margin-bottom:12px}
.gcr-field label{display:block;font-weight:600;font-size:13px;margin-bottom:5px;color:var(--gcr-ink)}
.gcr-field label input[type="checkbox"]{font-weight:400;margin-right:6px;vertical-align:middle}
.gcr-field input[type="text"],
.gcr-field input[type="number"],
.gcr-field select,
.gcr-field textarea{width:100%;max-width:420px;padding:7px 10px;border:1px solid var(--gcr-line);border-radius:6px;background:#fff;color:var(--gcr-ink);font-size:13px;font-family:inherit}
.gcr-field input[readonly]{background:var(--gcr-bg);color:var(--gcr-sub)}
.gcr-field input:focus,.gcr-field select:focus,.gcr-field textarea:focus{outline:none;border-color:var(--gcr-accent);box-shadow:0 0 0 3px rgba(26,115,232,.15)}
.gcr-desc{margin:5px 0 0;font-size:12px;color:var(--gcr-sub)}

.gcr-admin .btn{border-radius:6px;font-weight:600}
.gcr-admin .btn-primary{background:var(--gcr-accent);border-color:var(--gcr-accent)}

/* Two-column layout: controls | preview */
.gcr-cols{display:grid;grid-template-columns:1fr 1fr;gap:24px;align-items:start;margin-top:14px}
@media (max-width:860px){.gcr-cols{grid-template-columns:1fr}}

/* Controls column (fieldset-based, Display & Customize) */
.gcr-controls fieldset{border:1px solid var(--gcr-line);border-radius:var(--gcr-radius);padding:14px 16px 16px;margin:0 0 16px;background:var(--gcr-bg)}
.gcr-controls legend{padding:0 6px;font-weight:700;font-size:13px;color:var(--gcr-ink)}
.gcr-controls fieldset > label{display:block;font-weight:600;font-size:12px;color:var(--gcr-sub);margin:12px 0 4px}
.gcr-controls fieldset > label:first-of-type{margin-top:2px}
.gcr-controls fieldset > label:has(input[type="checkbox"]){display:flex;align-items:center;gap:7px;font-weight:400;color:var(--gcr-ink);font-size:13px;margin:8px 0}
.gcr-controls fieldset > label:has(input[type="checkbox"]) input{margin:0}
.gcr-controls select,.gcr-controls input[type="text"]{width:100%;padding:7px 10px;border:1px solid var(--gcr-line);border-radius:6px;background:#fff;color:var(--gcr-ink);font-size:13px;font-family:inherit}
.gcr-controls select:focus,.gcr-controls input:focus{outline:none;border-color:var(--gcr-accent);box-shadow:0 0 0 3px rgba(26,115,232,.15)}
.gcr-controls .gcr-desc{margin-bottom:4px}

/* Lock note (standard-Google-look fieldset) */
.gcr-lock{margin:12px 0 0;font-size:11px;color:var(--gcr-sub);background:#fff;border:1px dashed var(--gcr-line);border-radius:6px;padding:8px 10px}

/* Google-font GDPR hint */
.gcr-gfhint{display:none;margin:6px 0 0;font-size:11px;color:#7a4a00;background:#fff6e0;border:1px solid #f0d78c;border-radius:6px;padding:7px 10px}

/* Color swatches */
.gcr-swatches{display:flex;flex-wrap:wrap;gap:12px;margin-top:6px}
.gcr-sw{display:flex;flex-direction:column;align-items:center;gap:4px;background:#fff;border:1px solid var(--gcr-line);border-radius:8px;padding:8px 10px;min-width:64px}
.gcr-sw input[type="color"]{-webkit-appearance:none;appearance:none;width:34px;height:34px;padding:0;border:1px solid var(--gcr-line);border-radius:50%;cursor:pointer;background:none}
.gcr-sw input[type="color"]::-webkit-color-swatch-wrapper{padding:2px;border-radius:50%}
.gcr-sw input[type="color"]::-webkit-color-swatch{border:none;border-radius:50%}
.gcr-sw input[type="color"]::-moz-color-swatch{border:none;border-radius:50%}
.gcr-sw span{font-size:11px;color:var(--gcr-sub);text-transform:uppercase;letter-spacing:.04em}
.gcr-color-reset{cursor:pointer;border:1px solid var(--gcr-line);background:#fff;border-radius:5px;font-size:12px;line-height:1;padding:3px 7px;color:var(--gcr-sub);transition:color .15s ease,border-color .15s ease}
.gcr-color-reset:hover{color:var(--gcr-accent);border-color:var(--gcr-accent)}

/* Help / collapsible walkthrough */
.gcr-help{margin-top:18px;background:var(--gcr-bg);border:1px solid var(--gcr-line);border-radius:var(--gcr-radius);padding:4px 16px}
.gcr-help summary{cursor:pointer;font-weight:600;padding:10px 0;color:var(--gcr-accent);list-style:none}
.gcr-help summary::-webkit-details-marker{display:none}
.gcr-help summary::before{content:'▸ ';display:inline-block;transition:transform .15s ease}
.gcr-help[open] summary::before{transform:rotate(90deg)}
.gcr-help-body{padding:0 0 14px}
.gcr-help-body ol{margin:0 0 10px;padding-left:20px}
.gcr-help-body li{margin-bottom:6px}
.gcr-help-note{margin:0;font-size:12px;color:var(--gcr-sub)}

/* Cache status strip */
.gcr-cache{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:14px;padding:10px 14px;background:var(--gcr-bg);border:1px solid var(--gcr-line);border-radius:8px;font-size:12px;color:var(--gcr-sub)}
.gcr-cache b{color:var(--gcr-ink)}
.gcr-cache form{margin-left:auto}
.gcr-warn{flex-basis:100%;color:var(--gcr-warn);font-weight:600;margin-top:4px}

/* Preview column */
.gcr-preview-wrap{position:sticky;top:16px;background:var(--gcr-panel);border:1px solid var(--gcr-line);border-radius:var(--gcr-radius);padding:16px;align-self:start}
/* Stacked previews (badge + reviews) share one sticky column */
.gcr-preview-col{display:flex;flex-direction:column;gap:16px;position:sticky;top:16px;align-self:start}
.gcr-preview-col .gcr-preview-wrap{position:static;top:auto}

/* GBR rating-badge live preview */
.gcr-badge-cap{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--gcr-sub);margin:2px 0 6px}
.gcr-badge-off{color:var(--gcr-warn);font-weight:600;display:none}
.gcr-badge-cap.gcr-off .gcr-badge-off{display:inline}
.gcr-badge-stage{position:relative;isolation:isolate;height:214px;background:linear-gradient(135deg,#eef2f6 0%,#e4e8ee 100%);border:1px dashed var(--gcr-line);border-radius:8px;overflow:hidden;margin-bottom:14px}
/* Neutralize the storefront's position:fixed/z-index so the badge stays inside the stage.
   The inset is generous (24px) so the card's drop shadow — which defines the
   'elevated'/'card' templates — has room to render instead of being hard-clipped by
   the stage's overflow:hidden. */
.gcr-badge-stage .gcr-wfloat{position:absolute;z-index:1;top:auto;left:auto;right:auto;bottom:auto}
.gcr-badge-stage[data-position="RIGHT_BOTTOM"] .gcr-wfloat{right:24px;bottom:24px}
.gcr-badge-stage[data-position="LEFT_BOTTOM"] .gcr-wfloat{left:24px;bottom:24px}
.gcr-badge-pillrow{display:flex;justify-content:center;padding:12px 10px;background:var(--gcr-bg);border:1px dashed var(--gcr-line);border-radius:8px;overflow-x:auto}
.gcr-badge-off-el{opacity:.32;filter:grayscale(.45);transition:opacity .15s ease}
.gcr-pv-head{font-weight:700;font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:var(--gcr-sub);margin-bottom:12px}
.gcr-pv-stage{background:var(--gcr-bg);border:1px dashed var(--gcr-line);border-radius:8px;padding:14px 10px;overflow:hidden}
.gcr-pv-stage .gcr-reviews{margin:0 auto;max-width:100%}
.gcr-pv-note{margin:10px 0 0;font-size:11px;color:var(--gcr-sub)}

/* Customer Reviews (Tab 1) representation stage */
.gcr-cr-stage{position:relative;height:180px;background:linear-gradient(135deg,#eef2f6 0%,#e4e8ee 100%);border:1px dashed var(--gcr-line);border-radius:8px;overflow:hidden}
.gcr-cr-badge{position:absolute;bottom:14px;display:inline-flex;align-items:center;gap:6px;background:#fff;color:var(--gcr-ink);font-size:12px;font-weight:600;padding:8px 14px;border-radius:999px;box-shadow:0 4px 14px rgba(0,0,0,.16);white-space:nowrap;transition:left .2s ease,right .2s ease}
.gcr-cr-stage[data-position="RIGHT_BOTTOM"] .gcr-cr-badge{right:14px;left:auto}
.gcr-cr-stage[data-position="LEFT_BOTTOM"] .gcr-cr-badge{left:14px;right:auto}

@media (max-width:860px){.gcr-preview-wrap,.gcr-preview-col{position:static}}
