gdprcookieconsent/views/css/gdpr_cookie.css
Walz 5172966eb2 Improved GDPR compliance
- Add more customization
TODO: Update styling
2025-04-07 17:12:31 +02:00

296 lines
5.5 KiB
CSS

/**
* GDPR Cookie Consent Module for PrestaShop
*
* @author Walzen665
* @copyright Copyright (c) 2025
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/
/* Banner styles */
.gdpr-cookie-banner {
display: none;
position: fixed;
bottom: 0;
left: 0;
right: 0;
background-color: rgba(33, 41, 52, 0.95);
color: #fff;
padding: 15px;
z-index: 9999;
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}
.gdpr-cookie-banner-content {
max-width: 1200px;
margin: 0 auto;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
}
.gdpr-cookie-banner-content p {
flex: 1;
margin: 0 20px 10px 0;
font-size: 14px;
line-height: 1.5;
}
.gdpr-cookie-banner-buttons {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
/* Modal styles */
.gdpr-cookie-modal {
display: none;
position: fixed;
z-index: 10000;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgba(0, 0, 0, 0.5);
}
.gdpr-cookie-modal-content {
background-color: #fff;
margin: 5% auto;
padding: 20px;
border-radius: 5px;
width: 90%;
max-width: 800px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
max-height: 80vh;
overflow-y: auto;
}
.gdpr-cookie-modal-header {
border-bottom: 1px solid #e5e5e5;
margin-bottom: 15px;
padding-bottom: 10px;
}
.gdpr-cookie-modal-header h4 {
margin: 0;
color: #333;
font-size: 20px;
}
.gdpr-cookie-modal-body {
margin-bottom: 20px;
}
.gdpr-cookie-categories {
margin-top: 20px;
}
.gdpr-cookie-category {
margin-bottom: 15px;
padding: 10px;
border: 1px solid #eee;
border-radius: 5px;
background-color: #f9f9f9;
}
.gdpr-cookie-category label {
font-weight: bold;
display: inline-block;
margin-left: 5px;
}
.gdpr-cookie-category p {
margin-top: 5px;
margin-bottom: 0;
font-size: 13px;
color: #666;
}
.gdpr-cookie-modal-footer {
display: flex;
justify-content: space-between;
align-items: center;
border-top: 1px solid #e5e5e5;
padding-top: 15px;
}
.gdpr-cookie-more-info {
color: #555;
text-decoration: underline;
}
.gdpr-cookie-buttons {
display: flex;
gap: 10px;
}
/* Button styles */
.gdpr-cookie-decline,
.gdpr-cookie-banner-decline {
background-color: #f1f1f1;
color: #333;
border: none;
padding: 8px 15px;
text-align: center;
text-decoration: none;
font-size: 14px;
cursor: pointer;
border-radius: 3px;
transition: background-color 0.3s;
}
.gdpr-cookie-decline:hover,
.gdpr-cookie-banner-decline:hover {
background-color: #ddd;
}
.gdpr-cookie-accept-selected {
background-color: #4285f4;
color: white;
border: none;
padding: 8px 15px;
text-align: center;
text-decoration: none;
font-size: 14px;
cursor: pointer;
border-radius: 3px;
transition: background-color 0.3s;
}
.gdpr-cookie-accept-selected:hover {
background-color: #2b6edb;
}
.gdpr-cookie-accept-all,
.gdpr-cookie-banner-accept {
background-color: #4caf50;
color: white;
border: none;
padding: 8px 15px;
text-align: center;
text-decoration: none;
font-size: 14px;
cursor: pointer;
border-radius: 3px;
transition: background-color 0.3s;
}
.gdpr-cookie-accept-all:hover,
.gdpr-cookie-banner-accept:hover {
background-color: #45a049;
}
.gdpr-cookie-banner-settings {
background-color: transparent;
color: white;
border: 1px solid white;
padding: 8px 15px;
text-align: center;
text-decoration: none;
font-size: 14px;
cursor: pointer;
border-radius: 3px;
transition: background-color 0.3s;
}
.gdpr-cookie-banner-settings:hover {
background-color: rgba(255, 255, 255, 0.1);
}
/* Responsive adjustments */
@media (max-width: 768px) {
.gdpr-cookie-banner-content {
flex-direction: column;
align-items: flex-start;
}
.gdpr-cookie-banner-content p {
margin-right: 0;
margin-bottom: 15px;
}
.gdpr-cookie-modal-content {
width: 95%;
margin: 10% auto;
}
.gdpr-cookie-modal-footer {
flex-direction: column;
gap: 15px;
}
.gdpr-cookie-more-info {
margin-bottom: 10px;
}
}
.gdpr-cookie-info-block {
margin: 15px 0;
padding: 15px;
background-color: #f9f9f9;
border: 1px solid #eee;
border-radius: 5px;
}
.gdpr-cookie-info-block p {
margin: 5px 0;
font-size: 13px;
color: #666;
}
.gdpr-cookie-banner-info {
margin: 5px 0 10px;
}
.gdpr-cookie-banner-info p {
font-size: 12px;
opacity: 0.9;
margin: 0;
}
/* Equal prominence for buttons */
.gdpr-cookie-banner-decline,
.gdpr-cookie-banner-accept {
font-weight: 400;
padding: 8px 15px;
border-radius: 3px;
/* Make both buttons similar size but distinctive */
min-width: 120px;
}
.gdpr-cookie-banner-decline {
background-color: #f1f1f1;
color: #333;
border: 1px solid #ccc;
}
.gdpr-cookie-banner-accept {
background-color: #4caf50;
color: white;
border: 1px solid #4caf50;
}
/* Manage button styles */
.gdpr-cookie-manage-button {
position: fixed;
bottom: 20px;
right: 20px;
z-index: 9990;
}
.gdpr-cookie-manage {
padding: 8px 12px;
background-color: #f1f1f1;
color: #333;
border: 1px solid #ccc;
border-radius: 3px;
font-size: 12px;
cursor: pointer;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.gdpr-cookie-manage:hover {
background-color: #e5e5e5;
}