/**
 * TM Cookie Policy CSS Styles
 * 
 * GDPR-compliant cookie consent styling with:
 * - Responsive design for all devices
 * - Modal interface with sidebar navigation  
 * - Customizable colors via admin panel
 * - Legacy browser support
 * 
 * @author   Octavian Popa
 * @version  2.0
 * @since    2025
 */

/* Legacy Support */
#cookie-space {
	display:none;
	height: 51px;
}
#cookie-consent {
	width: 100%;
	position: fixed;
	left: 0;
	z-index: 999;
	background:#00bd35;
	display: none;
	padding: 10px 0px;
	top: 0;
	color:#fff;
	font-weight:bold;
	vertical-align:middle;
}
#cookie-consent #accept:hover {
	color:#000
}
#cookie-consent #accept {
	float: right;
	color: #FFF;
	cursor: pointer;
}
#cookie-inner {
	display: block;
}

/* GDPR Cookie Banner */
#gdpr-cookie-banner {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	/* background and color now set via inline styles from PHP */
	padding: 20px;
	z-index: 10000;
	box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.gdpr-banner-content {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.gdpr-banner-text {
	flex: 1;
	font-size: 14px;
	line-height: 1.4;
}

.gdpr-banner-text a {
	color: #696b6d;
	text-decoration: underline;
}

.gdpr-banner-actions {
	display: flex;
    gap: 0px;
    flex-shrink: 0;
    flex-direction: column;
    align-items: center;
}

.gdpr-btn {
	padding: 10px 20px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	transition: background-color 0.3s ease;
}

.gdpr-btn-accept {
	background: #54d054;
	color: white;
}

.gdpr-btn-accept:hover {
	opacity: 0.9;
}

/* Text buttons for reject and customize */
.gdpr-text-btn {
	background: none;
	border: none;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	padding: 10px 15px;
	transition: opacity 0.3s ease;
}

.gdpr-text-btn:hover {
	opacity: 0.8;
	text-decoration: underline;
	color: inherit;
}

.gdpr-text-btn:focus {
	outline: none;
}

/* GDPR Preferences Modal */
#gdpr-preferences-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.7);
	z-index: 10001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.gdpr-modal-content {
	background: white;
	border-radius: 8px;
	max-width: 900px;
	width: 100%;
	max-height: 90vh;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0,0,0,0.3);
	display: flex;
	flex-direction: column;
	position: relative;
	margin: 0 auto;
	height: 88vh;
}

.gdpr-modal-header {
	padding: 10px;
	border-bottom: 1px solid #eee;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.gdpr-modal-header h3 {
	margin: 0;
	color: #2c3e50;
}

.gdpr-close {
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: #7f8c8d;
	padding: 0;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gdpr-close:hover {
	color: #2c3e50;
}

/* New Layout with Sidebar */
.gdpr-modal-body {
	flex: 1 1 auto;
	overflow-y: auto;
}

.gdpr-layout {
	display: flex;
	height: 100%;
	min-height: 500px;
	overflow: hidden;
}

/* Left Sidebar */
.gdpr-sidebar {
	width: 300px;
	background: #f8f9fa;
	border-right: 1px solid #eee;
	display: flex;
	flex-direction: column;
}

.gdpr-intro-section {
	padding: 20px;
	border-bottom: 1px solid #eee;
	cursor: pointer;
	transition: all 0.3s ease;
}

.gdpr-intro-section h4 {
	margin: 0 0 10px 0;
	color: #2c3e50;
	font-size: 16px;
}

.gdpr-intro-section p {
	margin: 0;
	font-size: 13px;
	color: #666;
	line-height: 1.4;
}

/* Sidebar Navigation */
.gdpr-nav {
	flex: 1;
	overflow-y: auto;
}

.gdpr-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.gdpr-nav li {
	border-bottom: 1px solid #eee;
	margin: 0px;
	display: flex;
	align-items: center;
	position: relative;
}

.gdpr-nav-link {
	display: flex;
	align-items: center;
	padding: 15px 20px;
	color: #555;
	text-decoration: none;
	transition: all 0.3s ease;
	position: relative;
	flex: 1;
}

.gdpr-nav li:hover {
	background: #e9ecef;
}

.gdpr-nav li:hover .gdpr-nav-link {
	color: #2c3e50;
	text-decoration: none;
	background: transparent;
}

.gdpr-nav li.active {
	background: #696b6d;
}

.gdpr-nav li.active .gdpr-nav-link {
	background: transparent;
	color: white;
}

.gdpr-nav li.active:hover {
	background: #696b6d;
}

.gdpr-nav-link i {
	margin-right: 10px;
	width: 16px;
	text-align: center;
}

.gdpr-required {
	background: #e74c3c;
	color: white;
	font-size: 10px;
	padding: 2px 6px;
	border-radius: 10px;
	margin-left: auto;
	text-transform: uppercase;
	font-weight: 500;
}

.gdpr-nav li.active .gdpr-required {
	background: rgba(255,255,255,0.3);
}

/* Toggle Switch */
.gdpr-toggle {
	margin-right: 15px;
	position: relative;
	flex-shrink: 0;
}

.gdpr-switch {
	display: none;
}

.gdpr-switch + label {
	display: block;
	width: 40px;
	height: 20px;
	background: #ccc;
	border-radius: 10px;
	position: relative;
	cursor: pointer;
	transition: background 0.3s ease;
}

input[type=checkbox].gdpr-switch + label::before {
	content: '';
	display: block;
	width: 16px;
	height: 16px;
	background: white;
	border-radius: 50%;
	position: absolute;
	top: 2px;
	left: 2px;
	transition: transform 0.3s ease;
	box-shadow: 0 2px 4px rgba(0,0,0,0.2);
	border-radius: 100%;
}
input[type=checkbox].gdpr-switch + label::after {
	left: 2px;
	top: 2px;
}
	

.gdpr-switch:checked + label {
	background: #54d054;
}

.gdpr-switch:checked + label::before {
	transform: translateX(20px);
}

.gdpr-nav li.active .gdpr-switch + label {
	background: rgba(255,255,255,0.3);
}

.gdpr-nav li.active .gdpr-switch:checked + label {
	background: rgba(255,255,255,0.5);
}

/* Right Content Area */
.gdpr-content {
	flex: 1;
	overflow-y: auto;
	padding: 20px;
	background: white;
	max-height: 100%;
}

.gdpr-content-section {
	display: none;
}

.gdpr-content-section.active {
	display: block;
}

.gdpr-content-section h4 {
	margin: 0 0 15px 0;
	color: #2c3e50;
	font-size: 20px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.gdpr-always-active {
	background: #e74c3c;
	color: white;
	font-size: 11px;
	padding: 4px 8px;
	border-radius: 12px;
	text-transform: uppercase;
	font-weight: 500;
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.gdpr-content-section p {
	font-size: 14px;
	line-height: 1.6;
	color: #555;
	margin-bottom: 20px;
}

.gdpr-details {
	background: #f8f9fa;
	border-radius: 6px;
	padding: 20px;
	margin-top: 20px;
}

.gdpr-details h5 {
	margin: 0 0 10px 0;
	color: #2c3e50;
	font-size: 14px;
	font-weight: 600;
}

.gdpr-details ul {
	margin: 0 0 15px 0;
	padding-left: 20px;
}

.gdpr-details li {
	font-size: 13px;
	color: #666;
	margin-bottom: 5px;
	line-height: 1.4;
}

.gdpr-details p {
	font-size: 13px;
	margin: 0;
}

.gdpr-modal-footer {
	padding: 10px;
	border-top: 1px solid #eee;
	display: flex;
	gap: 10px;
	justify-content: flex-end;
}

.gdpr-btn-save {
	/* background: #696b6d; */
	color: #54d054;
}

.gdpr-btn-save:hover {
	background: #e2e3e4;
}

/* Prevent scrolling when modal is open */
body.gdpr-modal-open {
	overflow: hidden;
}

div .gdpr-details a {
	color: #696b6d;
	text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
	.gdpr-banner-content {
		flex-direction: column;
		text-align: center;
	}
	
	.gdpr-banner-actions {
		justify-content: center;
		flex-wrap: wrap;
		gap: 15px;
	}
	
	.gdpr-btn, .gdpr-text-btn {
		font-size: 12px;
		padding: 8px 16px;
	}
	
	#gdpr-preferences-modal {
		padding: 10px;
	}
	
	.gdpr-modal-content {
		width: 100%;
		margin: 0;
		max-height: 100vh;
		border-radius: 0;
	}
	
	.gdpr-layout {
		flex-direction: column;
		min-height: auto;
	}
	
	.gdpr-sidebar {
		width: 100%;
		max-height: 200px;
		order: 2;
	}
	
	.gdpr-content {
		padding: 20px;
		order: 1;
	}
	
	.gdpr-nav-link {
		padding: 10px 15px;
		font-size: 14px;
	}
	
	.gdpr-nav-link i {
		margin-right: 8px;
	}
	
	.gdpr-modal-footer {
		flex-direction: column;
		gap: 10px;
	}
	
	.gdpr-modal-footer .gdpr-btn {
		width: 100%;
	}
	
	/* Mobile settings button */
	.gdpr-settings-btn {
		bottom: 15px;
		left: 15px;
	}

	.gdpr-settings-btn button {
		width: 45px;
		height: 45px;
		font-size: 16px;
	}
}

/* Cookie Settings Floating Button */
.gdpr-settings-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    opacity: 1;
    /* visibility: hidden; */
    transition: all 0.3s ease;
}

.gdpr-settings-btn.visible {
    opacity: 1;
    visibility: visible;
}

.gdpr-settings-btn button {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #54d054;
    font-size: 18px;
    cursor: pointer;
    /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gdpr-settings-btn button:hover {
    /* background: #555; */
    transform: scale(1.3);
    /* box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); */
}

.gdpr-settings-btn button:active {
    transform: scale(0.95);
}

.gdpr-settings-btn button i {
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.gdpr-settings-btn button:hover i {
    animation-duration: 0.5s;
}