/* ============================================ */
/* GDPR Cookie dialog - Container Principal */
/* ============================================ */
.gdpr-container {
    font-size: .9em;
    width: 100%;
    max-width: 100vw; /* Previne overflow pe ecrane mici */
    font-family: 'Segoe UI', Arial, Helvetica, Verdana, sans-serif;
    box-shadow: #121212 2px 2px 14px 2px;
    position: fixed;
    background: #ffffff;
    opacity: 1;
    right: 0;
    bottom: 0;
    left: 0; /* Se asigură că ocupă toată lățimea */
    z-index: 99999;
    padding: 1rem;
    box-sizing: border-box; /* Include padding în calculul lățimii */
}

.gdprcookie {
    color: #000000;
    line-height: 1.4em;
    margin: auto;
    width: 50%;
    max-width: 800px; /* Limită pentru ecrane foarte mari */
}

/* ============================================ */
/* Titluri și Iconiță SVG */
/* ============================================ */
.gdprcookie h1,
.gdprcookie h2 {
    color: #000000;
    font-size: 12pt;
    font-weight: 700;
}

.gdprcookie h1 {
    background: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjQ2LjAwMDAwMHB0IiBoZWlnaHQ9IjM1LjAwMDAwMHB0IiB2aWV3Qm94PSIwIDAgNDYuMDAwMDAwIDM1LjAwMDAwMCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQgbWVldCI+IDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAuMDAwMDAwLDM1LjAwMDAwMCkgc2NhbGUoMC4xMDAwMDAsLTAuMTAwMDAwKSIgZmlsbD0iIzAwMDAwMCIgc3Ryb2tlPSJub25lIj4gPHBhdGggZD0iTTExOSAzMzQgYy02MSAtMTggLTEwOSAtNjMgLTEwOSAtMTAxIDAgLTM5IDIzIC02OSA3MyAtOTYgMzYgLTE5IDU3IC0yMiAxNDcgLTIyIDkwIDAgMTExIDMgMTQ3IDIyIDc5IDQzIDk2IDEwMyA0MiAxNTQgLTU5IDU1IC0xOTggNzUgLTMwMCA0M3ogbTI0MSAtNTQgYzggLTUgMTIgLTExIDEwIC0xMyAtMyAtMiAtNDAgLTI1IC04MyAtNTEgLTgyIC01MSAtODggLTUxIC0xNjEgLTIxIC0yOCAxMiAtMzYgMTkgLTI4IDI3IDggOCAyNCA3IDU2IC0yIDQ1IC0xMiA0NiAtMTIgMTA4IDI4IDY4IDQ0IDc1IDQ3IDk4IDMyeiIvPiA8cGF0aCBkPSJNMTAgMTIzIGMwIC02NiA5MyAtMTEzIDIyNCAtMTEzIDEyNCAwIDIxNiA1MSAyMTYgMTE5IGwwIDI0IC0yMCAtMjUgYy03MSAtOTAgLTMyMSAtOTQgLTM5NSAtNyBsLTI1IDMxIDAgLTI5eiIvPiA8L2c+IDwvc3ZnPg==") no-repeat left center;
    background-size: 3rem 3rem; /* Controlăm dimensiunea iconiței */
    padding-left: 5rem;
    line-height: 3rem; /* Redus pentru a nu crea spațiu mort */
    margin-bottom: -1rem;
}

.gdprcookie h2 {
    padding: 0 0 0 5rem;
}

.gdprcookie a {
    color: inherit;
}

.gdprcookie p {
    font-size: 10pt;
    font-weight: 400;
    padding: 0 0 0 5rem;
    text-align: justify;
}

/* ============================================ */
/* Butoane GDPR */
/* ============================================ */
.gdprcookie-buttons {
    text-align: center;
    padding: 1rem 0;
    display: flex; /* Flexbox pentru aliniere mai bună */
    flex-wrap: wrap; /* Permite wrapping pe mobil */
    justify-content: center;
    gap: 0.5rem; /* Spațiere consistentă între butoane */
}

.gdprcookie-buttons button {
    color: #000000;
    font-family: inherit;
    font-size: 1em;
    padding: .6rem 1.2rem; /* Ușor mai mare pentru touch */
    border: solid .05rem currentColor;
    border-radius: .15rem;
    margin: 0; /* Marginile sunt gestionate de gap */
    background: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px; /* Dimensiune minimă recomandată pentru accesibilitate touch */
}

.gdprcookie-buttons button:disabled {
    color: rgba(255,255,255,.5);
    cursor: not-allowed;
    opacity: 0.6;
}

/* BUTON ACCEPT */
.gdprcookie-buttons button#accept,
.gdprcookie-buttons .btn-primary {
    background-color: #3763eb;
    color: #ffffff;
    border-color: #3763eb;
}
.gdprcookie-buttons button#accept:hover,
.gdprcookie-buttons .btn-primary:hover {
    background-color: #2a50c4;
    border-color: #2a50c4;
}

/* BUTON REJECT ALL */
.gdprcookie-buttons button#reject,
.gdprcookie-buttons .btn-reject {
    background-color: #6c757d;
    color: #ffffff;
    border-color: #6c757d;
    min-width: 120px;
}
.gdprcookie-buttons button#reject:hover,
.gdprcookie-buttons .btn-reject:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

/* BUTON ADVANCED */
.gdprcookie-buttons button#advanced {
    background-color: #ffffff;
    color: #000000;
    border-color: #000000;
}
.gdprcookie-buttons button#advanced:hover {
    background-color: #f8f9fa;
}

/* ============================================ */
/* Cookie Types (Switches) */
/* ============================================ */
.gdprcookie-types ul {
    overflow: hidden;
    padding: 0 0 0 5rem;
    margin: 0 0 1rem;
    display: flex; /* Înlocuiește float cu flex */
    flex-wrap: wrap;
    gap: 1rem;
}

.gdprcookie-types li {
    display: flex;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    float: none; /* Anulează float-ul vechi */
}

.gdprcookie-types input[type=checkbox] {
    margin-right: .25rem;
}

/* ============================================ */
/* Switch Toggle Style */
/* ============================================ */
input.switch {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 62px;
    height: 32px;
    display: inline-block;
    position: relative;
    border-radius: 50px;
    overflow: hidden;
    outline: none;
    border: none;
    cursor: pointer;
    background-color: #707070;
    transition: background-color ease 0.3s;
    min-height: 32px;
    flex-shrink: 0; /* Previne micșorarea switch-ului */
}

input.switch:before {
    content: "on off";
    display: block;
    position: absolute;
    z-index: 2;
    width: 28px;
    height: 28px;
    background: #fff;
    left: 2px;
    top: 2px;
    border-radius: 50%;
    font: 10px/28px Helvetica;
    text-transform: uppercase;
    font-weight: bold;
    text-indent: -22px;
    word-spacing: 37px;
    color: #fff;
    text-shadow: -1px -1px rgba(0,0,0,0.15);
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    transition: all cubic-bezier(0.3, 1.5, 0.7, 1) 0.3s;
}

input.switch:checked {
    background-color: #3763eb;
}

#gdpr-cookietype-0 {
    background-color: #6c757d54;
    cursor: not-allowed; /* Indică vizual că e disabled */
}

input.switch:checked:before {
    left: 32px;
}

input.switch:empty ~ label {
    position: relative;
    float: none; /* Anulează float */
    line-height: 1.6em;
    text-indent: 0.1em;
    margin: 0.4em 0 0 0.5rem; /* Spațiu față de switch */
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    font-weight: normal;
}

/* ============================================ */
/* Copyright */
/* ============================================ */
.gdpr-copyrights {
    font: normal .5em Quicksand, sans-serif;
    padding-top: 1em;
    width: 100%;
    text-align: right;
    color: #777777;
}

.gdpr-copyrights a:link {
    text-decoration: none;
    color: #777777;
}

/* ============================================ */
/* MEDIA QUERIES - RESPONSIVE */
/* ============================================ */

/* TABLETĂ (max-width: 1024px) */
@media screen and (max-width: 1024px) {
    .gdprcookie {
        width: 70%;
    }
}

/* MOBIL (max-width: 800px) */
@media screen and (max-width: 800px) {
    .gdpr-container {
        padding: 1rem 0.75rem;
    }
    
    .gdprcookie {
        width: 100%; /* Full width pe mobil */
        max-width: none;
    }
    
    .gdprcookie h1,
    .gdprcookie h2,
    .gdprcookie p,
    .gdprcookie-types ul {
        padding-left: 1rem; /* Reducem padding-ul lateral */
    }
    
    .gdprcookie h1 {
        background-position: left center;
        background-size: 2.5rem 2.5rem; /* Iconiță mai mică */
        padding-left: 3.5rem;
        line-height: 2.5rem;
        margin-bottom: -0.5rem;
        font-size: 11pt;
    }
    
    .gdprcookie h2 {
        font-size: 11pt;
        padding-left: 1rem;
    }
    
    .gdprcookie p {
        font-size: 9pt;
        text-align: left; /* Justify poate crea spații urâte pe mobil */
        padding-left: 1rem;
    }
    
    .gdprcookie-buttons {
        flex-direction: column; /* Butoanele unul sub altul */
        width: 100%;
    }
    
    .gdprcookie-buttons button {
        width: 100%;
        margin: 0.25rem 0;
        padding: .8rem 1rem; /* Mai mari pentru degete */
    }
    
    .gdprcookie-types ul {
        flex-direction: column; /* Switch-urile unul sub altul */
        padding-left: 1rem;
        gap: 0.75rem;
    }
    
    .gdprcookie-types li {
        width: 100%;
        justify-content: space-between; /* Text stânga, switch dreapta */
        padding: 0.5rem 0;
        border-bottom: 1px solid #eee; /* Separator vizual */
    }
    
    .gdpr-copyrights {
        text-align: center;
        padding-top: 0.5rem;
    }
}

/* MOBIL MIC (max-width: 480px) */
@media screen and (max-width: 480px) {
    .gdpr-container {
        font-size: 0.85em;
        padding: 0.75rem 0.5rem;
    }
    
    .gdprcookie h1 {
        background-size: 2rem 2rem;
        padding-left: 3rem;
        line-height: 2rem;
    }
    
    .gdprcookie-buttons button {
        padding: .7rem 0.8rem;
        font-size: 0.95em;
    }
}