/**
 * Rabbits Cookies Consent — front-end styles (banner / modal / icon / declaration).
 *
 * Tokens from the Woodmart theme options of rabbits.world: primary rgb(158,153,26), button bg
 * rgb(197,190,0) → hover rgb(158,153,26), text rgb(64,56,52), body font Mali, titles Poppins 600,
 * rounded buttons.
 *
 * z-index: Tidio launcher is 999999999 and the opened side cart 1000000001 (child theme);
 * we sit above everything.
 */

:root {
	--rwcc-primary: rgb(158, 153, 26);
	--rwcc-primary-dark: rgb(128, 124, 20);
	--rwcc-btn: rgb(197, 190, 0);
	--rwcc-ink: rgb(64, 56, 52);
	--rwcc-border: #e6e2da;
	--rwcc-muted: #7a736d;
	--rwcc-z: 2147483000;
	--rwcc-font: "Mali", "Lato", sans-serif;
	--rwcc-title-font: "Poppins", "Lato", sans-serif;
}

/* Hidden by default; JS reveals (avoids FOUC). */
#rwcc[hidden], .rwcc-banner[hidden], .rwcc-backdrop[hidden], .rwcc-icon[hidden] { display: none !important; }

.rwcc { font-family: var(--rwcc-font); }

/* ---- Banner ---- */
.rwcc-banner {
	position: fixed; left: 24px; bottom: 24px; z-index: var(--rwcc-z);
	width: 400px; max-width: calc(100vw - 48px);
	background: #fff; color: var(--rwcc-ink);
	border: 1px solid var(--rwcc-border); border-radius: 14px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, .14);
	padding: 20px 22px 18px; box-sizing: border-box;
	animation: rwcc-in .28s ease both;
}
.rwcc-banner-title { margin: 0 0 8px; font-family: var(--rwcc-title-font); font-size: 17px; line-height: 1.25; font-weight: 600; color: var(--rwcc-ink); }
.rwcc-preview-badge { display: inline-block; vertical-align: middle; margin-left: 8px; font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--rwcc-muted); background: #f6f5f1; border: 1px solid var(--rwcc-border); border-radius: 999px; padding: 3px 8px; }
.rwcc-banner-desc { margin: 0 0 16px; font-size: 13.5px; line-height: 1.55; color: var(--rwcc-ink); }
.rwcc-banner-desc p { margin: 0 0 8px; }
.rwcc-banner-desc p:last-child { margin-bottom: 0; }
.rwcc-banner-desc a { color: var(--rwcc-primary); text-decoration: underline; }
.rwcc-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---- Buttons ----
   Woodmart styles every <button> (grey bg, uppercase, box-shadow); we must win regardless of
   the theme's selector weight, hence the #rwcc id prefix + !important on the visual props. */
#rwcc .rwcc-btn {
	font-family: var(--rwcc-title-font) !important; font-size: 13px !important; font-weight: 600 !important; line-height: 1 !important;
	border-radius: 999px !important; padding: 12px 20px !important; min-height: 44px; height: auto !important; cursor: pointer;
	border: 1.5px solid transparent !important; box-sizing: border-box; text-transform: none !important; letter-spacing: 0 !important;
	box-shadow: none !important; margin: 0 !important;
	transition: background .12s ease, color .12s ease, border-color .12s ease;
}
#rwcc .rwcc-btn-primary { background: var(--rwcc-btn) !important; color: #fff !important; border-color: var(--rwcc-btn) !important; flex: 1 1 auto; }
#rwcc .rwcc-btn-primary:hover { background: var(--rwcc-primary) !important; border-color: var(--rwcc-primary) !important; color: #fff !important; }
#rwcc .rwcc-btn-outline { background: #fff !important; color: var(--rwcc-primary) !important; border-color: var(--rwcc-primary) !important; flex: 1 1 auto; }
#rwcc .rwcc-btn-outline:hover { background: #f7f7ec !important; color: var(--rwcc-primary-dark) !important; }
#rwcc .rwcc-btn-link { background: transparent !important; color: var(--rwcc-muted) !important; border-color: transparent !important; text-decoration: underline; padding: 12px 12px !important; flex: 0 0 auto; }
#rwcc .rwcc-btn-link:hover { color: var(--rwcc-ink) !important; background: transparent !important; }
#rwcc .rwcc-btn:focus-visible, #rwcc .rwcc-icon:focus-visible, #rwcc .rwcc-close:focus-visible { outline: 2px solid var(--rwcc-primary); outline-offset: 2px; }

/* ---- Modal ---- */
.rwcc-backdrop {
	position: fixed; inset: 0; z-index: var(--rwcc-z); background: rgba(30, 25, 20, .5);
	display: flex; align-items: center; justify-content: center; padding: 20px; box-sizing: border-box;
	animation: rwcc-fade .18s ease both;
}
.rwcc-modal {
	background: #fff; color: var(--rwcc-ink); border-radius: 14px; width: 520px; max-width: 100%; max-height: 85vh;
	display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0, 0, 0, .28); animation: rwcc-in .24s ease both;
	font-family: var(--rwcc-font);
}
.rwcc-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--rwcc-border); }
.rwcc-modal-title { margin: 0; font-family: var(--rwcc-title-font); font-size: 17px; font-weight: 600; color: var(--rwcc-ink); }
#rwcc .rwcc-close { background: none !important; border: 0 !important; font-size: 26px !important; line-height: 1 !important; color: var(--rwcc-muted) !important; cursor: pointer; padding: 0 4px !important; box-shadow: none !important; min-height: 0; height: auto !important; margin: 0 !important; border-radius: 0; }
#rwcc .rwcc-close:hover { color: var(--rwcc-ink) !important; background: none !important; }
.rwcc-modal-body { padding: 18px 22px; overflow-y: auto; }
.rwcc-modal-intro { margin: 0 0 16px; font-size: 13.5px; line-height: 1.55; }

.rwcc-cat { border: 1px solid var(--rwcc-border); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.rwcc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rwcc-cat-name { font-size: 14px; font-weight: 600; font-family: var(--rwcc-title-font); color: var(--rwcc-ink); margin: 0; }
.rwcc-cat-desc { margin: 6px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--rwcc-muted); }
.rwcc-pill { font-size: 11px; font-weight: 600; color: var(--rwcc-primary); background: #f3f3e3; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.rwcc-modal-foot { padding: 16px 22px; border-top: 1px solid var(--rwcc-border); text-align: right; }
#rwcc .rwcc-modal-foot .rwcc-btn { min-width: 220px; }

/* Detailed variant (desktop ≥993px): two columns — vertical tab list left, panel right. */
.rwcc-modal--wide { width: 700px; }
@media (min-width: 993px) {
	.rwcc-modal--wide { height: 540px; max-height: 85vh; display: flex; flex-direction: column; }
	.rwcc-modal--wide .rwcc-modal-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
	.rwcc-modal--wide .rwcc-modal-intro { flex: none; }
	.rwcc-modal--wide .rwcc-ext { flex: 1; min-height: 0; }
	.rwcc-modal--wide .rwcc-ext-panels { overflow-y: auto; padding-right: 6px; }
}
.rwcc-ext { display: flex; align-items: stretch; gap: 18px; }
.rwcc-ext[hidden], .rwcc-simple[hidden] { display: none !important; }
.rwcc-ext .rwcc-tabbar { flex: 0 0 180px; display: flex; flex-direction: column; gap: 4px; background: #f6f5f1; border-radius: 12px; padding: 8px; align-self: stretch; }
#rwcc .rwcc-tab-btn {
	font-family: var(--rwcc-title-font) !important; font-size: 13px !important; font-weight: 500 !important; line-height: 1.3 !important; text-align: left !important; padding: 11px 12px !important;
	border: 0 !important; border-left: 3px solid transparent !important; border-radius: 8px !important; background: transparent !important; color: var(--rwcc-ink) !important; cursor: pointer; box-shadow: none !important;
	transition: background .12s ease, color .12s ease, border-color .12s ease; text-transform: none !important; letter-spacing: 0 !important; height: auto !important; margin: 0 !important; width: 100%;
}
#rwcc .rwcc-tab-btn:hover { color: var(--rwcc-primary) !important; background: transparent !important; }
#rwcc .rwcc-tab-btn[aria-selected="true"] { background: #fff !important; color: var(--rwcc-primary) !important; border-left-color: var(--rwcc-primary) !important; font-weight: 600 !important; box-shadow: 0 1px 3px rgba(16, 24, 40, .08) !important; }
.rwcc-tab-btn:focus-visible { outline: 2px solid var(--rwcc-primary); outline-offset: 2px; }
.rwcc-ext-panels { flex: 1; min-width: 0; }
.rwcc-panel[hidden] { display: none !important; }
.rwcc-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--rwcc-border); margin-bottom: 4px; }
.rwcc-panel-title { margin: 0 0 4px; font-family: var(--rwcc-title-font); font-size: 15px; font-weight: 600; color: var(--rwcc-ink); }
.rwcc-panel-desc { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--rwcc-muted); }
.rwcc-allow-all { display: flex; align-items: center; gap: 8px; flex: none; margin-top: 2px; }
.rwcc-allow-txt { font-size: 12px; color: var(--rwcc-muted); white-space: nowrap; }
.rwcc-svc-list { display: block; }
.rwcc-svc-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 2px; border-bottom: 1px solid #f0ede6; }
.rwcc-svc-row:last-child { border-bottom: 0; }
.rwcc-svc-txt { min-width: 0; }
.rwcc-svc-name { display: block; font-size: 13.5px; font-weight: 600; color: var(--rwcc-ink); margin: 0; }
label.rwcc-svc-name { cursor: pointer; }
.rwcc-svc-desc { margin: 3px 0 0; font-size: 12px; line-height: 1.5; color: var(--rwcc-muted); word-break: break-word; }
.rwcc-svc-row .rwcc-switch { margin-top: 2px; }
.rwcc-lock-glyph { flex: none; color: #a8a29b; margin-top: 3px; width: 44px; display: flex; justify-content: center; }

/* Toggles (pill switch) */
.rwcc-switch { position: relative; flex: none; cursor: pointer; display: inline-block; margin: 0; }
.rwcc-switch input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.rwcc-switch-track { display: block; width: 44px; height: 26px; border-radius: 999px; background: #d6d2ca; transition: background .15s ease; }
.rwcc-switch-dot { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s ease; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.rwcc-switch input:checked + .rwcc-switch-track { background: var(--rwcc-primary); }
.rwcc-switch input:checked + .rwcc-switch-track .rwcc-switch-dot { transform: translateX(18px); }
.rwcc-switch input:focus-visible + .rwcc-switch-track { outline: 2px solid var(--rwcc-primary); outline-offset: 2px; }

/* ---- Floating icon (bottom-left; Tidio sits bottom-right) ---- */
#rwcc .rwcc-icon {
	position: fixed; left: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: var(--rwcc-z);
	width: 44px; height: 44px !important; min-height: 0; margin: 0 !important; padding: 0 !important; border-radius: 50% !important;
	border: 1px solid var(--rwcc-border) !important; background: #fff !important; color: var(--rwcc-primary) !important;
	display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 16px rgba(0, 0, 0, .18) !important;
}
#rwcc .rwcc-icon:hover { box-shadow: 0 6px 20px rgba(0, 0, 0, .24) !important; background: #fff !important; }

/* ---- Public declaration ([rw_cookies]) ---- */
.rwcc-decl-cat { margin: 24px 0 10px; font-size: 18px; }
.rwcc-decl-table { width: 100%; table-layout: fixed; border-collapse: collapse; margin-bottom: 8px; font-size: 13.5px; }
/* Same column widths in all three tables (cookie / provider / purpose / duration). */
.rwcc-decl-table th:nth-child(1) { width: 22%; }
.rwcc-decl-table th:nth-child(2) { width: 18%; }
.rwcc-decl-table th:nth-child(3) { width: 45%; }
.rwcc-decl-table th:nth-child(4) { width: 15%; }
.rwcc-decl-table th, .rwcc-decl-table td { text-align: left; padding: 8px 10px; border: 1px solid var(--rwcc-border); vertical-align: top; }
.rwcc-decl-table th { background: #f6f5f1; font-weight: 600; }
.rwcc-decl-table code { font-size: 12.5px; word-break: break-word; }

/* ---- Animations ---- */
@keyframes rwcc-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes rwcc-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .rwcc-banner, .rwcc-backdrop, .rwcc-modal { animation: none; } }

/* ---- Mobile (≤992px): full-width bottom sheet, stacked buttons ---- */
@media (max-width: 992px) {
	.rwcc-banner { left: 0; right: 0; bottom: 0; width: 100%; max-width: 100%; border-radius: 14px 14px 0 0; border-left: 0; border-right: 0; border-bottom: 0; padding: 18px 18px calc(16px + env(safe-area-inset-bottom, 0)); }
	.rwcc-actions { flex-direction: column; align-items: stretch; }
	#rwcc .rwcc-btn { width: 100%; flex: none; }
	#rwcc .rwcc-btn-link { order: 3; }
	.rwcc-ext { flex-direction: column; }
	.rwcc-ext .rwcc-tabbar { flex-direction: row; overflow-x: auto; width: 100%; }
}
