.cgdpr-wrapper {
    position: fixed;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 550px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.2);
    z-index: 9999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    border: 1px solid #f0f0f0;
    max-height: 85vh;
    overflow: hidden;
}

/* .cgdpr-content e flex column — titlul fix, restul scrollează, butoanele fixe */
.cgdpr-content {
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    overflow: hidden;
    padding: 25px;
    box-sizing: border-box;
}

/* Titlu — fix, nu intră în scroll */
.cgdpr-content h3 {
    flex-shrink: 0;
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #1a1a1a;
}

/* Zona scrollabila: descrierea + setările împreună */
.cgdpr-scroll-zone {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;  /* crucial pentru flex + overflow */
}

.cgdpr-content p {
    font-size: 14px;
    color: #444;
    line-height: 1.5;
    margin-bottom: 15px;
}

#cgdpr-settings-area {
    margin-top: 0;
    margin-bottom: 5px;
    animation: cgdprFadeIn 0.3s ease-in;
}

/* Butoane — fixe jos, nu scrollează niciodată */
.cgdpr-actions {
    flex-shrink: 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

/* Footer links — fix sub butoane */
.cgdpr-footer-links {
    flex-shrink: 0;
    margin-top: 12px;
    font-size: 13px;
    text-align: center;
}

.cgdpr-btn { padding: 12px 18px; border-radius: 8px; border: none; cursor: pointer; font-size: 15px; font-weight: 600; transition: 0.2s; }
.cgdpr-btn.primary,
.cgdpr-btn.secondary { color: #fff !important; transition: 0.3s ease; }
.cgdpr-btn.primary:hover { filter: brightness(1.2); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.cgdpr-btn.secondary { background: #f0f0f0; color: #444; border: 1px solid #e5e5e5; }
.cgdpr-btn.secondary:hover { background: #ebebeb; border-color: #d0d0d0; color: #000; }

.cgdpr-item { border-bottom: 1px solid #eee; padding: 12px 0; }
.cgdpr-header { display: flex; align-items: center; padding: 5px 0; }
.cgdpr-cat-title { margin-left: 12px; font-size: 14px; font-weight: 600; flex-grow: 1; color: #333; cursor: pointer; }

.cgdpr-arrow-details { display: flex; align-items: center; gap: 8px; cursor: pointer; margin-left: 10px; }
.cgdpr-details-text { font-size: 12px; color: #999; font-weight: normal; cursor: pointer; }
.cgdpr-arrow { font-size: 18px; color: #bbb; transition: transform 0.3s; display: inline-block; cursor: pointer; }
.cgdpr-item.open .cgdpr-arrow { transform: rotate(90deg); }
.cgdpr-item.open .cgdpr-details-text { color: #666; }
.cgdpr-body { display: none; padding: 8px 0 8px 46px; font-size: 13px; color: #777; }

/* Switch */
.cgdpr-switch { position: relative; display: inline-block; width: 34px; height: 20px; }
.cgdpr-switch input { opacity: 0; width: 0; height: 0; }
.cgdpr-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
.cgdpr-slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .cgdpr-slider { background-color: #1a1a1a; }
input:checked + .cgdpr-slider:before { transform: translateX(14px); }

.cgdpr-footer-links a { color: #666666; text-decoration: none; margin: 0 8px; transition: color 0.2s ease; font-weight: 500; }
.cgdpr-footer-links a:hover { color: #1a1a1a; text-decoration: underline; }

@keyframes cgdprFadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

iframe[data-blocked="true"] { display: block; width: 100%; min-height: 200px; background: #f9f9f9; border: 1px dashed #ccc; }
iframe[data-blocked="true"]:before { content: "Conținut blocat. Acceptă cookie-urile de marketing pentru a vedea acest element."; display: block; padding: 20px; text-align: center; color: #666; font-size: 14px; }

.cgdpr-table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1em 0; }
.cgdpr-table-responsive table { min-width: 600px; width: 100%; margin: 0; }

#cgdpr-barrier { display: none; }

@media (min-width: 481px) {
    .cgdpr-actions { flex-wrap: nowrap; }
    .cgdpr-actions .cgdpr-btn { flex: 1; text-align: center; white-space: nowrap; }
}

@media (max-width: 480px) {
    .cgdpr-wrapper { max-height: 85vh; }
    .cgdpr-content { max-height: 85vh; padding: 20px; }
    .cgdpr-actions { flex-direction: column; gap: 8px; }
    .cgdpr-actions .cgdpr-btn { width: 100%; box-sizing: border-box; }
    .cgdpr-table-responsive table { font-size: 12px; }
    .cgdpr-table-responsive td, .cgdpr-table-responsive th { padding: 6px 4px; }
    html body .cgdpr-wrapper .cgdpr-content p { font-size: 15px !important; line-height: 1.5 !important; }
    html body .cgdpr-wrapper .cgdpr-actions .cgdpr-btn { font-size: 16px !important; padding: 12px 15px !important; }
    html body .cgdpr-wrapper .cgdpr-cat-title { font-size: 16px !important; }
    html body .cgdpr-wrapper .cgdpr-body,
    html body .cgdpr-wrapper .cgdpr-details-text { font-size: 15px !important; }
    html body .cgdpr-wrapper .cgdpr-footer-links,
    html body .cgdpr-wrapper .cgdpr-footer-links a { font-size: 15px !important; }
}

/* ── Overlay pagină — blur + întunecat în spatele barei cookie ── */
#cgdpr-page-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100lvh;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999998; /* sub bara cookie (9999999) */
    pointer-events: none;
}