/**
 * Plugin Name: BP Cookie Consent v2
 * Description: GDPR compliant cookie consent banner with Google Consent Mode v2 integration.
 * Version: 5.1.0
 * Author: Bogdan Păunică
 */

.test-css-path{color:red;}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.clear {
    clear: both;
    height: 1px;
    margin: 0;
    padding: 0;
    width: 100%;
}

/* Basic styling for the cookie consent banner */
#cookie-consent-v2-banner {
    /*position: fixed;
    left: 0;
    bottom: 60px;*/
	position: absolute;
	left: calc(50%-240px);
	top: calc( 50% - 20vh);
    width: 100%;
    max-width: 480px;
    background-color: #f0f0f0;
    background-color: rgba( 255, 248, 250 );
	border: 2px solid rgba(33, 217,64);
    padding: 20px;
    z-index: 9998;
    box-shadow: 0px -2px 5px rgba(0, 0, 0, 0.2);
    max-height: 80vh;
    box-sizing: border-box;
    
    display: flex;
    flex-direction: column; /* Makes elements stack vertically */
	
	font-size: 18px;
}


/* Desktop adjustments */
@media (min-width: 640px) {
    #cookie-consent-v2-banner {
        
        width: 480px;
        /*position: fixed;
        right: 20px;
        bottom: 20px;
        left: 0;*/
    	position: absolute;
    	left: calc(50% - 240px);
		top: calc( 50% - 200px );
    }
}

/* Title - fixed height */
#cookie-consent-v2-banner-title {
    /*background-color: #9f001f;
    color: white;*/
    text-align: left;
    padding: 1em;
	padding: 10px;
    font-weight: bold;
    height: 50px; /* Fixed height */
}

.cookie-banner-title {
    margin: 0;
    font-size: 1.2em;
    font-size: 18px;
}

/* Scrollable text - takes remaining space */
#cookie-consent-v2-banner-text {
    overflow-y: auto;
    padding: 10px;
    flex-grow: 1; /* Allows text area to take up remaining space */
    min-height: 50px; /* Prevents it from disappearing */
}


/* Centered text inside the banner */
#cookie-consent-v2-banner p {
    /*margin-bottom: 10px;*/
    text-align: left;
    font-size: 1em;
    font-size: 14px; 
	line-height: 24px;
}

/* Links section - uniform styling for links & button */
.cookie-consent-v2-links {
    text-align: left;
    margin: 0;
}

.cookie-consent-v2-links .link-button {
    display: inline-block;
    padding: 8px 12px;
   /* color: #9f001f;*/
    text-decoration: none;
    font-size: 0.9em;
    /*border: 1px solid #9f001f;
    background: none;*/
    cursor: pointer;
    margin: 5px;
	color: #3b4249;
}

.cookie-consent-v2-links .link-button:hover {
    /*background-color: #9f001f;
    color: white;*/
	color: rgba(3, 168, 78);
	
}

/* Buttons section */
.cookie-consent-v2-buttons {
    text-align: center;
    margin-top: 10px;
	font-weight: bold;
}

#cookie-consent-v2-reject-button,
#cookie-consent-v2-accept-button {
    display: inline-block;
    width: 48%;
    padding: 10px;
    border: none;
    background-color: rgba(3, 168, 78);
    color: white;
    cursor: pointer;
    font-size: 1em;
	margin-bottom: 5px;
}

#cookie-consent-v2-reject-button:hover,
#cookie-consent-v2-accept-button:hover {
    /*background-color: #d82146;*/
    background-color: rgba( 51, 51, 51);
}

#cookie-consent-v2-preferences-button{
	display: inline-block;
    width: 48%;
    padding: 10px;
    border: 2px solid rgba(3, 168, 78);
	background-color: rgba( 255, 248, 250 );
    /*color: white;*/
	color: rgba(3, 168, 78);
    cursor: pointer;
    font-size: 1em;
}
#cookie-consent-v2-preferences-button:hover{
	color: rgba( 51, 51, 51);
	border: 2px solid rgba( 51, 51, 51);
}

/* List styling */
#cookie-consent-v2-banner ul {
    font-size: 0.9em;
    text-align: left;
    margin-left: 0.4em;
    padding-left: 1em;
    list-style-type: disc;
}

#cookie-consent-v2-banner ul li {
    margin-bottom: 0.5em;
    line-height: 1.4;
}

/* Preferences button */
#cookie-consent-v2-preferences-button-duplicate {
    padding: 0 1.5em;
    height: 3em;
    background-color: rgba(144, 238, 144, 0.6);
    color: white;
    font-size: 1em;
    font-weight: bold;
    border: none;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 1em;
    left: 1em;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#cookie-consent-v2-preferences-button-duplicate:hover {
    background-color: rgba(144, 238, 144, 0.99);
}

#cookie-consent-v2-preferences-button-duplicate::before {
    content: "⚙ "; /* Adds a settings icon before the text */
    font-size: 1em; /* Match text size */
    margin-right: 5px; /* Space between icon and text */
}


/* Media Query for screens wider than 640px (Desktop) */
@media (min-width: 640px) {
    #cookie-consent-v2-preferences-button-duplicate {
	/*right:1em !important;*/
	left:1em !important;
	}
}

/* Simplified styles for the cookie consent modal */

/* Background */
#cookie-consent-v2-preferences-modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 240px;
    left: 0;
    width: 100%;
	/* position: absolute;
   	left: calculate( 50% - 240px);
   	top: calculate( 50% - 120px);	*/
	
    background-color: white;
    /*padding: 20px;
    border-top: 1px solid #ccc;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);*/
    z-index: 10000;
	background-color: rgba( 255, 248, 250 );
	border: 2px solid rgba(3, 168, 78);
	font-size: 18px;
}

/* Ensure the modal is always positioned relative to the viewport */
html, body {
    height: 100%;
    margin: 0;
    overflow-x: hidden;
}

/* Modal content */
#cookie-consent-v2-preferences-modal .modal-content {
     /*max-height: 65vh ;
    overflow-y: auto;
   	padding-bottom: 20px;*/
	max-height: 55vh;
    overflow-y: auto;
    padding: 0 0 0 20px;
	background-color: rgba( 255, 248, 250 );
}
#cookie-consent-v2-preferences-modal .modal-content p {
    font-size: 14px;
}

/* Close button */
#cookie-consent-v2-preferences-modal .close {
   position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
}

#cookie-consent-v2-preferences-modal label
{
	font-size:14px;
	margin: 0 0 0;
}

/* Save Preferences button */
#cookie-consent-v2-preferences-modal #cookie-consent-v2-save-preferences {
    padding: 10px 20px;
    background-color: lightgreen;
    background-color:rgba(3, 168, 78);
    border: none;
    color: white;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    display: block;
    width: auto;
}
#cookie-consent-v2-preferences-modal #cookie-consent-v2-save-preferences:hover{
	background-color: rgba( 51, 51, 51);
}

/* Show when modal is open */
#cookie-consent-v2-preferences-modal.show {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
}

/* Desktop adjustments */
@media (min-width: 640px) {
    #cookie-consent-v2-preferences-modal {
        /*position: fixed;
        
        right: 20px;
        bottom: 60px;
        left: auto;
        left: 0;*/
    	position: absolute;
		left: calc(50% - 240px);
		top: calc( 50% - 130px);
    	width: 480px;
    	/*left: 300px;
    	top: 80px;*/
        height: 37vh ;
    	border: 2px solid rgba(3, 168, 78);
    }
}
