/**
* 2010-2026 SwissGeek | Web Developer Freelance
*
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https:// opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https:// devdocs.prestashop.com/ for more information.
*
* @Module		SGKPSRGPD - GDPR & ePrivacy Compliance
* @Description	Cookie consent with Google Consent Mode v2, server-side module blocking, GDPR data subject requests and automatic anonymisation.
* @Version		1.2.0
* @Copyright	SwissGeek | Web Developer Freelance <https://swissgeek.dev/>
* @support		Support Requests <https://admin.swissgeek.dev/forms/ticket?styled=1&with_logo=1>
* @Blog			Breaking News <https://news.swissgeek.dev/> <https://news.prestageek.ch/>
* @Addons		Developments <https://prestageek.ch/> <https://add.swissgeek.dev/>
*
* @license		http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*				Valid for 1 website (or project) for each purchase of license International Registered 
*				Trademark & Property of SwissGeek. More information on <https://swissgeek.dev/license/>
*/
/**
 * Front office styles: consent banner and privacy centre.
 *
 * Everything is prefixed .sgk-gdpr so the module never repaints the merchant's
 * theme, and the banner inherits the theme's font rather than importing one.
 */

.sgk-gdpr {
    --sgk-accent: #D41414;
    position: fixed;
    z-index: 9999;
    /* left/right first: inset-inline is unsupported on the older browsers a
       merchant's customers may still be on, and a banner that fails to lay out
       is a banner that cannot collect consent. */
    left: 0;
    right: 0;
    inset-inline: 0;
    display: flex;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    pointer-events: none;
}

.sgk-gdpr--bottom {
    bottom: 0;
}

.sgk-gdpr--center {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    align-items: center;
    background: rgba(15, 15, 20, .55);
}

.sgk-gdpr__box {
    pointer-events: auto;
    width: 100%;
    max-width: 760px;
    background: #fff;
    color: #1E1E26;
    border: 1px solid #E1E1E8;
    border-radius: 14px;
    box-shadow: 0 18px 48px -16px rgba(15, 15, 25, .38);
    padding: 20px 22px;
    box-sizing: border-box;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
}

.sgk-gdpr__title {
    margin: 0 0 8px;
    font-size: 1.12rem;
    line-height: 1.3;
    font-weight: 700;
}

.sgk-gdpr__text {
    margin: 0 0 14px;
    font-size: .92rem;
    line-height: 1.55;
}

/* Le marchand peut ecrire des blocs dans l'editeur : ils doivent respirer sans
   ajouter de marge sous le dernier, sinon le bandeau se decale. */
.sgk-gdpr__text p {
    margin: 0 0 8px;
}

.sgk-gdpr__text p:last-child {
    margin-bottom: 0;
}

.sgk-gdpr__text ul,
.sgk-gdpr__text ol {
    margin: 0 0 8px;
    padding-left: 20px;
}

.sgk-gdpr__text li {
    margin: 2px 0;
}

.sgk-gdpr__text a {
    color: var(--sgk-accent);
    text-decoration: underline;
}

.sgk-gdpr__link {
    color: var(--sgk-accent);
    text-decoration: underline;
    white-space: nowrap;
}

.sgk-gdpr__details {
    display: grid;
    gap: 10px;
    margin: 0 0 16px;
    padding: 14px;
    background: #F6F7F9;
    border: 1px solid #E9E9EF;
    border-radius: 10px;
}

.sgk-gdpr__cat {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    cursor: pointer;
    margin: 0;
    font-weight: 400;
}

.sgk-gdpr__cat input {
    margin: 3px 0 0;
    width: 18px;
    height: 18px;
    flex: none;
    accent-color: var(--sgk-accent);
    cursor: pointer;
}

.sgk-gdpr__cat input:disabled {
    cursor: not-allowed;
    opacity: .6;
}

.sgk-gdpr__cat-body {
    display: block;
}

.sgk-gdpr__cat-name {
    display: block;
    font-weight: 600;
    font-size: .9rem;
}

.sgk-gdpr__cat-name em {
    font-style: normal;
    font-weight: 400;
    font-size: .78rem;
    color: #6B6B78;
    margin-left: 6px;
}

.sgk-gdpr__cat-desc {
    display: block;
    font-size: .82rem;
    line-height: 1.45;
    color: #55555F;
}

.sgk-gdpr__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.sgk-gdpr__btn {
    appearance: none;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 11px 18px;
    font: inherit;
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.2;
    min-height: 44px;
    transition: filter .15s ease, background-color .15s ease;
}

.sgk-gdpr__btn:focus-visible {
    outline: 3px solid rgba(20, 20, 30, .35);
    outline-offset: 2px;
}

/* Accept and reject are the same size on purpose: a refusal that costs more
   than an acceptance is not a freely given consent. */
.sgk-gdpr__btn--equal {
    flex: 1 1 180px;
    background: #1E1E26;
    color: #fff;
}

.sgk-gdpr__btn--accent {
    background: var(--sgk-accent);
}

.sgk-gdpr__btn--equal:hover {
    filter: brightness(1.12);
}

.sgk-gdpr__btn--ghost,
.sgk-gdpr__btn--save {
    background: #fff;
    border-color: #D5D5DE;
    color: #1E1E26;
}

.sgk-gdpr__btn--ghost:hover,
.sgk-gdpr__btn--save:hover {
    background: #F2F2F6;
}

/* ---------- Privacy centre ------------------------------------------- */

.sgk-gdpr-page__intro {
    margin-bottom: 22px;
}

.sgk-gdpr-page__section {
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 1px solid #E6E6EC;
}

.sgk-gdpr-page__section:last-child {
    border-bottom: 0;
}

.sgk-gdpr-page__section--muted {
    font-size: .9rem;
    color: #55555F;
}

.sgk-gdpr-page__help {
    font-size: .88rem;
    color: #6B6B78;
}

.sgk-gdpr-page__exports {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sgk-gdpr-page__rights {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.sgk-gdpr-page__right {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1px solid #E6E6EC;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 400;
    margin: 0;
}

.sgk-gdpr-page__right input {
    margin: 3px 0 0;
    flex: none;
}

.sgk-gdpr-page__right strong {
    display: block;
    font-size: .95rem;
}

.sgk-gdpr-page__right em {
    display: block;
    font-style: normal;
    font-size: .84rem;
    color: #6B6B78;
    line-height: 1.45;
}

.sgk-gdpr-page__note {
    font-size: .82rem;
    color: #6B6B78;
}

.sgk-gdpr-page__table {
    font-size: .88rem;
}

@media (max-width: 680px) {
    .sgk-gdpr {
        padding: 8px;
    }

    .sgk-gdpr__box {
        padding: 16px;
    }

    .sgk-gdpr__btn {
        flex: 1 1 100%;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sgk-gdpr__btn {
        transition: none;
    }
}
