/* Rank Cookie Consent */
#rcc-banner, #rcc-banner *, #rcc-modal, #rcc-modal *, #rcc-reopen { box-sizing: border-box; }
#rcc-banner[hidden], #rcc-modal[hidden], #rcc-reopen[hidden], #rcc-overlay[hidden] { display: none !important; }

/* ---------- Banner ---------- */
.rcc-banner {
	position: fixed;
	z-index: var(--rcc-z, 99990);
	background: var(--rcc-bg, #fff);
	color: var(--rcc-text, #212121);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.5;
	text-align: start;
	border-radius: var(--rcc-radius, 8px);
	box-shadow: 0 6px 28px rgba(0, 0, 0, .18);
	opacity: 0;
	transform: translateY(12px);
	transition: opacity .25s ease, transform .25s ease;
}
.rcc-banner.rcc-show { opacity: 1; transform: none; }
.rcc-inner { padding: 20px; }
.rcc-banner .rcc-title {
	margin: 0 0 8px; padding: 0;
	font-size: 18px; font-weight: 700; line-height: 1.3;
	color: var(--rcc-text, #212121);
}
.rcc-banner .rcc-msg {
	margin: 0 0 16px; padding: 0;
	font-size: 14px; line-height: 1.55;
	color: var(--rcc-text, #212121);
}
.rcc-banner a, .rcc-modal a { color: var(--rcc-primary); text-decoration: underline; }
.rcc-actions { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Buttons ---------- */
#rcc-banner .rcc-btn, #rcc-modal .rcc-btn {
	-webkit-appearance: none; appearance: none;
	display: block; width: 100%; margin: 0;
	min-height: 44px; padding: 10px 16px;
	font: inherit; font-size: 15px; font-weight: 500; line-height: 1.2;
	text-align: center; text-transform: none; letter-spacing: normal; text-decoration: none;
	border: 2px solid var(--rcc-primary, #1863dc);
	border-radius: calc(var(--rcc-radius, 8px) / 2);
	box-shadow: none;
	cursor: pointer;
	transition: background-color .15s, filter .15s;
}
#rcc-banner .rcc-btn-primary, #rcc-modal .rcc-btn-primary { background: var(--rcc-primary, #1863dc); color: var(--rcc-primary-text, #fff); }
#rcc-banner .rcc-btn-outline, #rcc-modal .rcc-btn-outline { background: transparent; color: var(--rcc-primary, #1863dc); }
#rcc-banner .rcc-btn-primary:hover, #rcc-modal .rcc-btn-primary:hover { filter: brightness(.9); }
#rcc-banner .rcc-btn-outline:hover, #rcc-modal .rcc-btn-outline:hover { background: rgba(0, 0, 0, .04); }
.rcc-btn:focus-visible, .rcc-close:focus-visible, .rcc-reopen:focus-visible, .rcc-switch input:focus-visible + .rcc-slider {
	outline: 3px solid var(--rcc-primary, #1863dc); outline-offset: 2px;
}

/* ---------- Desktop positions ---------- */
@media (min-width: 768px) {
	.rcc-d-bottom-left  { left: var(--rcc-d-offset); bottom: var(--rcc-d-offset); width: 400px; max-width: calc(100vw - 40px); }
	.rcc-d-bottom-right { right: var(--rcc-d-offset); bottom: var(--rcc-d-offset); width: 400px; max-width: calc(100vw - 40px); }

	.rcc-d-center { left: 50%; top: 50%; width: 480px; max-width: calc(100vw - 40px); transform: translate(-50%, calc(-50% + 12px)); }
	.rcc-d-center.rcc-show { transform: translate(-50%, -50%); }

	.rcc-d-bottom-bar, .rcc-d-top-bar { left: 0; right: 0; border-radius: 0; }
	.rcc-d-bottom-bar { bottom: 0; }
	.rcc-d-top-bar { top: 0; transform: translateY(-12px); }
	.admin-bar .rcc-d-top-bar { top: 32px; }
	.rcc-d-bottom-bar .rcc-inner, .rcc-d-top-bar .rcc-inner { display: flex; align-items: center; gap: 28px; max-width: 1240px; margin: 0 auto; }
	.rcc-d-bottom-bar .rcc-content, .rcc-d-top-bar .rcc-content { flex: 1 1 auto; }
	.rcc-d-bottom-bar .rcc-msg, .rcc-d-top-bar .rcc-msg { margin: 0; }
	.rcc-d-bottom-bar .rcc-actions, .rcc-d-top-bar .rcc-actions { flex-direction: row; flex: 0 0 auto; }
	#rcc-banner.rcc-d-bottom-bar .rcc-btn, #rcc-banner.rcc-d-top-bar .rcc-btn { width: auto; white-space: nowrap; }
}

/* ---------- Mobile positions ---------- */
@media (max-width: 767.98px) {
	.rcc-banner { left: 8px; right: 8px; width: auto; max-height: 75vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }

	/* Üstte: alttaki WhatsApp / arama / form butonları her zaman tıklanabilir kalır */
	.rcc-m-top { top: calc(8px + env(safe-area-inset-top, 0px)); transform: translateY(-16px); }
	.admin-bar .rcc-m-top { top: 54px; }

	/* Altta ama sabit butonların ÜSTÜNDE (offset px admin panelinden) */
	.rcc-m-bottom { bottom: calc(var(--rcc-m-offset, 90px) + env(safe-area-inset-bottom, 0px)); }

	.rcc-m-center { top: 50%; transform: translateY(calc(-50% + 12px)); }
	.rcc-m-center.rcc-show { transform: translateY(-50%); }

	/* Kompakt mobil düzen */
	.rcc-m-compact .rcc-inner { padding: 12px 14px; }
	.rcc-m-compact .rcc-title { font-size: 15px; margin-bottom: 4px; }
	.rcc-m-compact .rcc-msg { font-size: 12.5px; line-height: 1.45; margin-bottom: 10px; }
	.rcc-m-compact .rcc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
	#rcc-banner.rcc-m-compact .rcc-btn { min-height: 40px; padding: 8px 10px; font-size: 14px; }
	.rcc-m-compact .rcc-btn[data-rcc-action="reject"] { order: 1; }
	.rcc-m-compact .rcc-btn[data-rcc-action="accept"] { order: 2; }
	#rcc-banner.rcc-m-compact .rcc-btn[data-rcc-action="customize"] {
		order: 3; grid-column: 1 / -1;
		min-height: 0; padding: 2px; border: 0; background: none;
		font-size: 13px; text-decoration: underline;
	}
	.rcc-m-hide-title .rcc-title { display: none; }
}

/* ---------- Optional overlay ---------- */
.rcc-overlay { position: fixed; inset: 0; z-index: calc(var(--rcc-z, 99990) - 1); background: rgba(0, 0, 0, .45); }

/* ---------- Preferences modal ---------- */
.rcc-modal { position: fixed; inset: 0; z-index: calc(var(--rcc-z, 99990) + 10); display: flex; align-items: center; justify-content: center; padding: 16px; font-family: inherit; }
.rcc-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); opacity: 0; transition: opacity .2s; }
.rcc-modal-box {
	position: relative; display: flex; flex-direction: column;
	width: 100%; max-width: 560px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
	background: var(--rcc-bg, #fff); color: var(--rcc-text, #212121);
	border-radius: var(--rcc-radius, 8px); box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
	font-size: 14px; line-height: 1.5; text-align: start;
	opacity: 0; transform: scale(.97); transition: opacity .2s, transform .2s; outline: none;
}
.rcc-modal.rcc-show .rcc-modal-backdrop { opacity: 1; }
.rcc-modal.rcc-show .rcc-modal-box { opacity: 1; transform: none; }
.rcc-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid rgba(0, 0, 0, .08); }
.rcc-modal .rcc-modal-title { margin: 0; font-size: 18px; font-weight: 700; color: var(--rcc-text, #212121); }
#rcc-modal .rcc-close { -webkit-appearance: none; appearance: none; width: 36px; height: 36px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--rcc-text, #212121); font-size: 26px; line-height: 1; cursor: pointer; }
#rcc-modal .rcc-close:hover { background: rgba(0, 0, 0, .06); }
.rcc-modal-body { padding: 16px 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.rcc-modal .rcc-modal-intro { margin: 0 0 12px; font-size: 13.5px; color: var(--rcc-text, #212121); opacity: .9; }
.rcc-cat { padding: 12px 0; border-top: 1px solid rgba(0, 0, 0, .08); }
.rcc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; cursor: pointer; font-weight: 400; }
.rcc-cat-title { font-weight: 600; font-size: 15px; }
.rcc-always { font-size: 13px; font-weight: 600; color: #1a8f3c; white-space: nowrap; }
.rcc-modal .rcc-cat-desc { margin: 4px 0 0; font-size: 13px; opacity: .85; color: var(--rcc-text, #212121); }
.rcc-modal-foot { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid rgba(0, 0, 0, .08); }
#rcc-modal .rcc-modal-foot .rcc-btn { flex: 1 1 0; font-size: 14px; padding: 10px 8px; }
@media (max-width: 560px) {
	.rcc-modal { padding: 8px; align-items: flex-end; }
	.rcc-modal-foot { flex-direction: column; }
	.rcc-modal-foot .rcc-btn[data-rcc-action="accept"] { order: -1; }
}

/* Switch */
.rcc-switch { position: relative; display: inline-block; flex: 0 0 auto; width: 44px; height: 24px; }
.rcc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.rcc-slider { position: absolute; inset: 0; background: #c4c4c4; border-radius: 24px; transition: background .2s; }
.rcc-slider::before { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .2s; }
.rcc-switch input:checked + .rcc-slider { background: var(--rcc-primary, #1863dc); }
.rcc-switch input:checked + .rcc-slider::before { transform: translateX(20px); }
[dir="rtl"] .rcc-switch input:checked + .rcc-slider::before { transform: translateX(-20px); }
[dir="rtl"] .rcc-slider::before { left: auto; right: 3px; }

html.rcc-lock, html.rcc-lock body { overflow: hidden !important; }

/* ---------- Reopen button ---------- */
.rcc-reopen {
	position: fixed; bottom: 16px; z-index: calc(var(--rcc-z, 99990) - 2);
	width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: var(--rcc-primary, #1863dc); color: var(--rcc-primary-text, #fff);
	box-shadow: 0 3px 12px rgba(0, 0, 0, .2); cursor: pointer;
}
.rcc-reopen-left { left: 16px; }
.rcc-reopen-right { right: 16px; }

@media (prefers-reduced-motion: reduce) {
	.rcc-banner, .rcc-modal-box, .rcc-modal-backdrop { transition: none; }
}
