/* ------------------------------------------------------------------
 * Variables CSS por defecto
 * ------------------------------------------------------------------ */
:root {
	--sbwscf-bg-color: #fff;
	--sbwscf-text-color: #000000;
	--sbwscf-title-color: #000000;
	--sbwscf-accept-bg: #4caf50;
	--sbwscf-accept-text: #fff;
	--sbwscf-reject-bg: #f44336;
	--sbwscf-reject-text: #fff;
	--sbwscf-preferences-bg: #e0e0e0;
	--sbwscf-preferences-text: #000000;
	--sbwscf-link-color: #0000ee;
}

.sbwscf-smile-cookies-panel {
	position: fixed;
	bottom: 1rem;
	left: 1rem;
	right: 1rem;
	color: var(--sbwscf-text-color);
	z-index: 9999;
	margin: auto;
	border-radius: 8px;
	box-shadow: 0 0 1.5rem rgba(0, 0, 0, 0.25);
	font-family: system-ui, sans-serif;
	display: flex;
	background-color: var(--sbwscf-bg-color);
	flex-direction: column;
	gap: 1rem;
}

.sbwscf-smile-cookies-box {
	padding: 25px;
	border-radius: 5px;
}

/* Tamaño fullscreen: toda la pantalla y bloqueo total */
.sbwscf-smile-size-fullscreen {
	position: fixed;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.8);
	z-index: 9999;
	display: flex;
	justify-content: center;
	align-items: center;
	color: var(--sbwscf-text-color);
	padding: 2rem;
	border-radius: 8px;
}

.sbwscf-smile-size-fullscreen .sbwscf-smile-cookies-box {
	max-width: 760px;
}

/* Corregir large para que no sea fullscreen */
.sbwscf-smile-size-large {
	display: flex;
	justify-content: end;
	align-items: stretch;
	background-color: #fff;
	color: var(--sbwscf-text-color);
	width: 95%;
	max-width: 1600px;
	border-radius: 8px;
	box-shadow: 0 0 1.5rem rgba(0, 0, 0, 0.4);
	z-index: 9999;
}

/* Tamaño small: panel discreto en esquina inferior izquierda */
.sbwscf-smile-size-small {
	position: fixed;
	bottom: 1rem;
	left: 1rem;
	z-index: 9999;
	max-width: 760px;
	width: 95%;
	box-shadow: 0 0 1rem rgba(0, 0, 0, 0.3);
	border-radius: 6px;
}

/* Asegurar que el texto también se adapte */
.sbwscf-smile-size-small .sbwscf-smile-cookies-message,
.sbwscf-smile-size-small .sbwscf-smile-cookies-buttons,
.sbwscf-smile-size-small .sbwscf-smile-cookies-links {
	font-size: 0.9rem;
}


/* ------------------------------------------------------------------
 * Estilos del panel de cookies
 * ------------------------------------------------------------------ */
.sbwscf-smile-cookies-header {
	margin-bottom: 10px;
}

.sbwscf-smile-cookies-title {
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--sbwscf-title-color);
}

.sbwscf-smile-cookies-close {
	background: none;
	border: none;
	color: var(--sbwscf-text-color);
	font-size: 1.5rem;
	cursor: pointer;
	line-height: 1;
}

.sbwscf-smile-cookies-message {
	font-size: 0.95rem;
	line-height: 1.5;
	margin-bottom: 15px;
	color: var(--sbwscf-text-color);
}

.sbwscf-smile-cookies-message p {
	color: var(--sbwscf-text-color);
}

/* ------------------------------------------------------------------
 * Botones
 * ------------------------------------------------------------------ */

.sbwscf-smile-cookies-buttons {
	display: inline-flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin-bottom: 10px;
	justify-content: center;
	text-align: center;
	width: 100%;
}

.sbwscf-smile-cookies-buttons button {
	padding: 0.5rem 1rem;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-weight: 600;
	font-size: 0.95rem;
	transition: background-color 0.2s ease;
}

.sbwscf-smile-cookies-accept {
	background-color: var(--sbwscf-accept-bg);
	color: var(--sbwscf-accept-text)
}

.sbwscf-smile-cookies-accept:hover {
	opacity: 0.8;
}

.sbwscf-smile-cookies-deny {
	background-color: var(--sbwscf-reject-bg);
	color: var(--sbwscf-reject-text);
}

.sbwscf-smile-cookies-deny:hover {
	opacity: 0.8;
}


.sbwscf-smile-cookies-preferences {
	background-color: var(--sbwscf-preferences-bg);
	color: var(--sbwscf-preferences-text);
}

.sbwscf-smile-cookies-preferences:hover {
	opacity: 0.8;
}

/* ------------------------------------------------------------------
 * Enlaces
 * ------------------------------------------------------------------ */
.sbwscf-smile-cookies-links {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	font-size: 0.75rem;
	justify-content: center;
}

.sbwscf-smile-cookies-links a {
	color: var(--sbwscf-link-color);
	text-decoration: underline;
}

#sbwscf-smile-cookies-panel .sbwscf-smile-cookies-title a,
#sbwscf-smile-cookies-panel .sbwscf-cookie-title a,
#sbwscf-smile-cookies-panel .sbwscf-cookie-summary a,
#sbwscf-smile-cookies-panel .sbwscf-smile-cookies-message a,
#sbwscf-smile-cookies-panel .sbwscf-cookie-description a {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: currentColor;
}

#sbwscf-smile-cookies-panel a:hover {
	text-decoration: none;
}

.sbwscf-cookie-description,
.sbwscf-cookie-description *,
.sbwscf-cookie-description p {
	color: var(--sbwscf-text-color);
}

.sbwscf-smile-cookies-links a:hover {
	opacity: 0.8;
	text-decoration: none;
}

/* ------------------------------------------------------------------
 * Responsive
 * ------------------------------------------------------------------ */
@media (max-width: 600px) {
	.sbwscf-smile-cookies-panel {
		padding: 1rem;
	}
}

/*
* ------------------------------------------------------------------
* Botón flotante: “Manage Consent”
* ------------------------------------------------------------------
*/
.sbwscf-manage-consent-container {
	position: fixed;
	bottom: 0;
	width: 100%;
	display: flex;
	z-index: 9998;
	pointer-events: none;
}

.sbwscf-manage-consent-button {
	pointer-events: all;
	padding: 10px 16px;
	font-size: 0.9rem;
	border: none;
	border-radius: 6px 6px 0 0;
	cursor: pointer;
	box-shadow: 0 0 1rem rgba(0, 0, 0, 0.25);
	transition: all 0.2s ease-in-out;
}

/* Posiciones dinámicas */
.sbwscf-position-left {
	justify-content: flex-start;
	padding-left: 1.5rem;
}

.sbwscf-position-center {
	justify-content: center;
}

.sbwscf-position-right {
	justify-content: flex-end;
	padding-right: 1.5rem;
}

/* Show label title */
#sbwscf-manage-consent-btn {
	background-color: var(--sbwscf-bg-color);
	color: var(--sbwscf-text-color);
}

#sbwscf-manage-consent-btn.show-label {
	position: relative;
	top: 0;
}

#sbwscf-manage-consent-btn.hide-label {
	position: relative;
	top: 28px;
	transition: top 0.3s ease-in-out;
}

#sbwscf-manage-consent-btn.hide-label:hover {
	top: 0;
}

/*
* ------------------------------------------------------------------
* Panel de cookies - Preferencias detalladas
* ------------------------------------------------------------------
*/

#sbwscf-cookie-categories {
	margin-bottom: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

#sbwscf-cookie-categories[hidden] {
	display: none !important;
}



.sbwscf-cookie-category {
	position: relative;
	border: 1px solid #ddd;
	border-radius: 6px;
	overflow: hidden;
	background-color: #fff;
	--sbwscf-toggle-width: clamp(180px, 5%, 200px);
}

.sbwscf-cookie-accordion {
	margin: 0;
}

.sbwscf-cookie-summary {
	display: block;
	cursor: pointer;
	padding-top: 0.75rem;
	padding-bottom: 0.75rem;
	padding-right: 0.1rem;
	padding-left: 1rem;
	padding-right: calc(var(--sbwscf-toggle-width) + 0.1rem);
	font-weight: 400;
	background-color: #f0f0f0;
	color: var(--sbwscf-text-color);
}

.sbwscf-cookie-accordion[open] .sbwscf-cookie-summary {
	border-bottom: 1px solid #ddd;
}

.sbwscf-cookie-title {
	display: inline-block;
	font-size: 1rem;
	line-height: 1.2rem;
	color: var(--sbwscf-title-color);
	padding-right: 0.5rem;
}

.sbwscf-cookie-toggle {
	position: absolute;
	top: 0;
	right: 0;
	width: var(--sbwscf-toggle-width);
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.5rem;
	padding-top: 0.75rem;
	padding-bottom: 0.75rem;
	padding-right: 0.75rem;
	padding-left: 0rem;
	background-color: #f0f0f0;
	border-left: 0px solid #ddd;
	z-index: 1;
}

.sbwscf-cookie-accordion[open]~.sbwscf-cookie-toggle {
	border-bottom: 0px solid #ddd;
}

.sbwscf-cookie-checkbox {
	display: flex;
	align-items: center;
	font-size: 1.2em;
	gap: 0.5rem;
}

.sbwscf-cookie-description {
	padding: 1rem;
	background-color: #f8f8f8;
	font-size: 0.9rem;
	line-height: 1.5;
	color: var(--sbwscf-text-color);
}

@media (max-width: 640px) {
	.sbwscf-cookie-category {
		--sbwscf-toggle-width: 100%;
	}

	.sbwscf-cookie-summary {
		padding-right: 1rem;
	}

	.sbwscf-cookie-toggle {
		position: static;
		width: 100%;
		justify-content: flex-start;
		border-left: none;
		border-top: 1px solid #ddd;
		border-bottom: none;
		padding-left: 1rem;
	}

	.sbwscf-cookie-accordion[open]~.sbwscf-cookie-toggle {
		border-bottom: 1px solid #ddd;
	}
}

.sbwscf-cookie-description span {
	font-size: 0.9rem !important;
}

/*
* ------------------------------------------------------------------
* Scroll interno del panel de cookies - Cuando hay muchas Preferencias
* ------------------------------------------------------------------
*/
.sbwscf-smile-cookies-box {
	max-height: 90vh;
	overflow-y: auto;
	overflow-x: hidden;
	scrollbar-width: thin;
}

/* Scroll estético para navegadores WebKit */
.sbwscf-smile-cookies-box::-webkit-scrollbar {
	width: 6px;
}

.sbwscf-smile-cookies-box::-webkit-scrollbar-thumb {
	background-color: rgba(0, 0, 0, 0.2);
	border-radius: 4px;
}