/**
 * Privacy Consent Modals
 * Change Privacy Settings | Privacy Settings History | Withdraw Consent
 *
 * @package Hello_Elementor_Child
 */

/* ── Overlay ────────────────────────────────────────────── */
.nbp-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba( 0, 0, 0, 0.55 );
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.nbp-modal-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

/* ── Dialog box ─────────────────────────────────────────── */
.nbp-modal {
	background: #fff;
	border-radius: 6px;
	width: 100%;
	max-width: 540px;
	max-height: 90vh;
	overflow-y: auto;
	position: relative;
	transform: translateY( 16px );
	transition: transform 0.25s ease;
	box-shadow: 0 8px 40px rgba( 0, 0, 0, 0.18 );
}

.nbp-modal-overlay.is-open .nbp-modal {
	transform: translateY( 0 );
}

/* ── Modal header ───────────────────────────────────────── */
.nbp-modal-header {
	padding: 24px 24px 16px;
	border-bottom: 1px solid #eee;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	position: sticky;
	top: 0;
	background: #fff;
	z-index: 1;
}

.nbp-modal-title {
	font-size: 18px;
	font-weight: 700;
	color: #24272D;
	margin: 0;
	line-height: 1.3;
}

.nbp-modal-close {
	all: unset;
	box-sizing: border-box;
	cursor: pointer;
	padding: 0px 6px !important;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #f0f0f0;
	color: #444 !important;
	font-size: 20px;
	line-height: 1;
	flex-shrink: 0;
	transition: background 0.15s, color 0.15s;
}

.nbp-modal-close:hover {
	background: #f0f0f0;
	color: #24272D;
}

/* ── Modal body ─────────────────────────────────────────── */
.nbp-modal-body {
	padding: 20px 24px;
}

.nbp-modal-intro {
	font-size: 14px;
	color: #555;
	line-height: 1.6;
	margin: 0 0 20px;
}

/* ── Modal footer ───────────────────────────────────────── */
.nbp-modal-footer {
	padding: 16px 24px 24px;
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	flex-wrap: wrap;
	border-top: 1px solid #eee;
}

/* ── Buttons ────────────────────────────────────────────── */
.nbp-btn {
	all: unset;
	box-sizing: border-box;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 20px;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
	white-space: nowrap;
}

.nbp-btn-primary,
.nbp-btn-primary:link,
.nbp-btn-primary:visited {
	background: #B87456 !important;
	color: #fff !important;
}

.nbp-btn-primary:hover,
.nbp-btn-primary:focus {
	background: #9a5e3f !important;
	color: #fff !important;
}

.nbp-btn-secondary,
.nbp-btn-secondary:link,
.nbp-btn-secondary:visited {
	background: #5B7699 !important;
	color: #fff !important;
}

.nbp-btn-secondary:hover,
.nbp-btn-secondary:focus {
	background: #4a6080 !important;
	color: #fff !important;
}

.nbp-btn-outline,
.nbp-btn-outline:link,
.nbp-btn-outline:visited {
	border: 1.5px solid #ccc !important;
	color: #555 !important;
	background: transparent !important;
}

.nbp-btn-outline:hover,
.nbp-btn-outline:focus {
	border-color: #888 !important;
	color: #24272D !important;
}

.nbp-btn-danger,
.nbp-btn-danger:link,
.nbp-btn-danger:visited {
	background: #c0392b !important;
	color: #fff !important;
}

.nbp-btn-danger:hover,
.nbp-btn-danger:focus {
	background: #a93226 !important;
	color: #fff !important;
}

/* ── Cookie toggle rows ─────────────────────────────────── */
.nbp-cookie-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 0;
	border-bottom: 1px solid #f0f0f0;
}

.nbp-cookie-row:last-child {
	border-bottom: none;
}

.nbp-cookie-info {
	flex: 1;
}

.nbp-cookie-label {
	font-size: 14px;
	font-weight: 600;
	color: #24272D;
	margin: 0 0 4px;
}

.nbp-cookie-desc {
	font-size: 13px;
	color: #777;
	line-height: 1.5;
	margin: 0;
}

/* ── Toggle switch ──────────────────────────────────────── */
.nbp-toggle {
	position: relative;
	flex-shrink: 0;
	margin-top: 2px;
}

.nbp-toggle input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}

.nbp-toggle-track {
	display: block;
	width: 44px;
	height: 24px;
	background: #ccc;
	border-radius: 12px;
	cursor: pointer;
	transition: background 0.2s;
	position: relative;
}

.nbp-toggle-track::after {
	content: '';
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.2s;
	box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.2 );
}

.nbp-toggle input:checked + .nbp-toggle-track {
	background: #B87456;
}

.nbp-toggle input:checked + .nbp-toggle-track::after {
	transform: translateX( 20px );
}

.nbp-toggle input:disabled + .nbp-toggle-track {
	background: #5B7699;
	cursor: not-allowed;
	opacity: 0.85;
}

.nbp-toggle input:disabled + .nbp-toggle-track::after {
	transform: translateX( 20px );
}

.nbp-always-on {
	font-size: 11px;
	color: #5B7699;
	font-weight: 600;
	text-align: center;
	margin-top: 4px;
	display: block;
	white-space: nowrap;
}

/* ── History table ──────────────────────────────────────── */
.nbp-history-empty {
	font-size: 14px;
	color: #888;
	text-align: center;
	padding: 24px 0;
}

.nbp-history-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.nbp-history-table th {
	text-align: left;
	padding: 8px 10px;
	background: #f5f5f5;
	color: #24272D;
	font-weight: 600;
	border-bottom: 2px solid #e0e0e0;
}

.nbp-history-table td {
	padding: 10px 10px;
	border-bottom: 1px solid #f0f0f0;
	color: #555;
	vertical-align: top;
}

.nbp-history-table tr:last-child td {
	border-bottom: none;
}

.nbp-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 7px;
	border-radius: 3px;
	margin: 1px 2px;
}

.nbp-badge-on {
	background: #e8f4e8;
	color: #2d7a2d;
}

.nbp-badge-off {
	background: #f4e8e8;
	color: #a93226;
}

/* ── Withdraw confirmation ──────────────────────────────── */
.nbp-withdraw-icon {
	text-align: center;
	font-size: 40px;
	margin-bottom: 12px;
}

.nbp-withdraw-message {
	font-size: 14px;
	color: #555;
	line-height: 1.7;
	text-align: center;
	margin: 0;
}

.nbp-success-notice {
	background: #e8f4e8;
	border: 1px solid #b2d8b2;
	border-radius: 4px;
	color: #2d7a2d;
	font-size: 13px;
	padding: 12px 16px;
	margin-top: 16px;
	display: none;
}

/* ── Responsive ─────────────────────────────────────────── */
@media ( max-width: 600px ) {
	.nbp-modal {
		max-width: 100%;
		border-radius: 8px 8px 0 0;
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		max-height: 85vh;
	}

	.nbp-modal-overlay {
		align-items: flex-end;
		padding: 0;
	}

	.nbp-modal-footer {
		flex-direction: column-reverse;
	}

	.nbp-btn {
		width: 100%;
		justify-content: center;
	}
}
