/* ============================================================
   GOOGLE CONSENT MODE v2 — Design 2026 (Pronet Design)
   Desktop: card centrat, colturi mari, umbra soft, blur
   Mobil:   bottom-sheet full-width
   ============================================================ */

#google-consent-mode {
    position: fixed;
    bottom: 15px;
    right: 15px;
    z-index: 999999999;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#google-consent-mode.hard-mode {
    bottom: 0;
    right: 0;
    left: 0;
    top: 0;
    align-items: center;
    justify-content: center;
    background: rgba(15, 17, 21, 0.45);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    animation: consentFadeIn 0.25s ease-out;
}

@keyframes consentFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes consentSlideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

#google-consent-mode-window {
    background-color: var(--google-consent-mode-background-color, #fff);
    color: var(--google-consent-mode-theme-color, #111);
    border: none;
    border-radius: 24px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25), 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 28px;
    width: 480px;
    max-width: 92vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    animation: consentSlideUp 0.3s ease-out;
}

#google-consent-mode-window-body {
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #d4d6da transparent;
}

#google-consent-mode-window-body::-webkit-scrollbar {
    width: 5px;
}

#google-consent-mode-window-body::-webkit-scrollbar-thumb {
    background: #d4d6da;
    border-radius: 99px;
}

/* ---------- Header ---------- */

#google-consent-mode-window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

#google-consent-mode-window-header-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

/* ---------- Body text ---------- */

#google-consent-mode-window-main-content p,
#consent-brief-info p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
    opacity: 0.85;
}

#google-consent-mode-window-main-content > a,
#consent-brief-info a {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--google-consent-mode-theme-color, #111);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Footer / butoane ---------- */

#google-consent-mode-window-footer {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#google-consent-mode-window-footer button {
    font-family: inherit;
    cursor: pointer;
}

#consent-window-accept {
    order: 1;
    width: 100%;
    background-color: #000;
    border: 1px solid #000;
    border-radius: 999px;
    color: #fff;
    padding: 13px 24px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

#consent-window-accept:hover {
    background-color: #1d1d1f;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

#consent-window-customise {
    order: 3;
    width: 100%;
    background-color: transparent;
    border: 1px solid #d9dade;
    border-radius: 999px;
    color: var(--google-consent-mode-theme-color, #111);
    padding: 12px 24px;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.2;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

#consent-window-customise:hover {
    background-color: #f5f5f7;
    border-color: #111;
    color: var(--google-consent-mode-theme-color, #111);
}

.rejectbtns {
    order: 4;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#consent-window-back,
#consent-window-reject-all {
    flex: 1;
    min-width: 120px;
    background-color: transparent;
    border: 1px solid #d9dade;
    border-radius: 999px;
    color: var(--google-consent-mode-theme-color, #111);
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

#consent-window-back:hover,
#consent-window-reject-all:hover {
    background-color: #f5f5f7;
    border-color: #111;
    color: var(--google-consent-mode-theme-color, #111);
}

/* Refuz cu prominenta egala cu Accept (cerinta EDPB/ANSPDCP) */
#consent-window-reject {
    order: 2;
    width: 100%;
    background-color: transparent;
    border: 1px solid #111;
    border-radius: 999px;
    color: var(--google-consent-mode-theme-color, #111);
    padding: 13px 24px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

#consent-window-reject:hover {
    background-color: #f5f5f7;
    color: var(--google-consent-mode-theme-color, #111);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* ---------- Switch-uri categorii ---------- */

#google-consent-mode .consent-window-switch {
    border-bottom: 1px solid #f0f0f2;
    padding: 4px 0;
}

#google-consent-mode .consent-window-switch:last-child {
    border-bottom: none;
}

#google-consent-mode .consent-window-switch-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

#google-consent-mode .consent-window-switch label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0;
    cursor: pointer;
}

#google-consent-mode .consent-window-switch input {
    display: none;
}

#google-consent-mode .consent-window-switch label .consent-window-switch-switcher {
    background-color: #d4d6da;
    border-radius: 999px;
    cursor: pointer;
    display: flex;
    height: 26px;
    position: relative;
    width: 46px;
    flex-shrink: 0;
    transition: background-color 0.25s ease;
}

#google-consent-mode .consent-window-switch .consent-window-switch-switcher::before {
    background-color: #fff;
    border-radius: 50%;
    content: '';
    height: 20px;
    width: 20px;
    left: 0;
    position: absolute;
    top: 0;
    margin: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform 0.25s ease;
}

#google-consent-mode .consent-window-switch input:checked + label .consent-window-switch-switcher {
    background-color: #000;
}

#google-consent-mode .consent-window-switch input:checked + label .consent-window-switch-switcher::before {
    transform: translateX(20px);
}

#google-consent-mode .consent-window-switch label .consent-window-switch-text {
    font-size: 14px;
    line-height: 1.4;
}

/* Switch-uri esentiale (dezactivate) */
#google-consent-mode .consent-window-switch input:disabled + label .consent-window-switch-switcher {
    background-color: #000;
    opacity: 0.35;
    cursor: not-allowed;
}

#google-consent-mode .consent-window-switch input:disabled + label .consent-window-switch-switcher::before {
    transform: translateX(20px);
}

#google-consent-mode .consent-window-switch input:disabled + label {
    cursor: default;
}

#google-consent-mode .consent-window-switch input:disabled + label .consent-window-switch-text {
    font-weight: 600;
}

/* Buton chevron descriere */
#google-consent-mode .consent-window-switch-toggle {
    background: transparent;
    border: none;
    color: var(--google-consent-mode-theme-color, #111);
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    margin-left: 10px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

#google-consent-mode .consent-window-switch-toggle:hover,
#google-consent-mode .consent-window-switch-toggle.active {
    opacity: 1;
}

.consent-window-switch-toggle i {
    background: #f1f2f4;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    border-radius: 50%;
    font-size: 11px;
    transition: background-color 0.2s ease;
}

.consent-window-switch-toggle:hover i {
    background: #e4e6e9;
}

/* Descriere categorie (expandabila) */
#google-consent-mode .consent-window-switch-description {
    font-size: 12.5px;
    color: #5c5f66;
    margin: 0 0 10px;
    padding: 12px 14px;
    line-height: 1.5;
    background-color: #f6f7f8;
    border: none;
    border-radius: 12px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; max-height: 0; }
    to   { opacity: 1; max-height: 500px; }
}

/* ---------- Tabs (segmented control) ---------- */

#consent-detailed-info {
    max-width: 100%;
    border: none !important;
    border-radius: 0 !important;
}

.consent-tabs {
    display: flex;
    gap: 4px;
    background: #f1f2f4;
    border: none;
    border-bottom: none;
    border-radius: 12px;
    padding: 4px;
}

.consent-tab-btn {
    flex: 1;
    padding: 10px 14px;
    border: none;
    border-radius: 9px;
    background: transparent;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.2s ease;
}

.consent-tab-btn.active {
    background-color: #fff;
    color: #111;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.consent-tab-btn:hover:not(.active) {
    color: #111;
}

.consent-tab-content {
    background: transparent;
    padding: 14px 2px 0;
    max-height: 320px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #d4d6da transparent;
}

.consent-tab-content::-webkit-scrollbar {
    width: 5px;
}

.consent-tab-content::-webkit-scrollbar-thumb {
    background: #d4d6da;
    border-radius: 99px;
}

.consent-tab-pane {
    display: none;
}

.consent-tab-pane.active {
    display: block;
}

/* Brief info */
#consent-brief-info {
    margin-bottom: 14px;
}

.consent-link-button {
    background: none;
    border: none;
    color: var(--google-consent-mode-theme-color, #111);
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font-size: inherit;
    font-family: inherit;
}

.consent-link-button:hover {
    opacity: 0.7;
}

/* About cookies */
.consent-about-content p {
    margin-bottom: 14px;
    font-size: 13.5px;
    line-height: 1.6;
    color: #5c5f66;
}

.consent-about-content a {
    color: var(--google-consent-mode-theme-color, #111);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Buton "Gestioneaza consimtamantul" — floating circular ---------- */

#google-consent-mode-manage-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999;
}

#google-consent-manage-trigger {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 0;
    white-space: normal;
    overflow: visible;
}

#google-consent-manage-trigger:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    padding-bottom: 0;
}

#google-consent-manage-trigger svg {
    width: 26px;
    height: 26px;
    display: block;
}

/* ---------- Tabele cookie ---------- */

.cookie-count-badge {
    font-size: 0.8em;
    color: #666;
    font-weight: normal;
}

.cookie-table-container {
    margin-top: 15px;
    border: 1px solid #ececef;
    border-radius: 12px;
    overflow: hidden;
}

.cookie-table-title {
    background: #f6f7f8;
    margin: 0;
    padding: 12px 15px;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #ececef;
}

/* Tabelul devine lista de carduri lizibile - fara scroll orizontal */
.cookie-table-wrapper {
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
}

.cookie-table {
    width: 100%;
    margin: 0;
    display: block;
}

.cookie-table thead {
    display: none;
}

.cookie-table tbody {
    display: block;
}

.cookie-table tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #f1f1f2;
    background: #fff;
}

.cookie-table tbody tr:last-child {
    border-bottom: none;
}

#google-consent-mode .cookie-table td {
    display: block;
    padding: 0 !important;
    border: 0 !important;
    vertical-align: top;
    line-height: 1.45;
    background: transparent !important;
}

td.cookie-name {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
}

td.cookie-expiry {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
}

td.cookie-provider {
    grid-column: 1 / 3;
    grid-row: 2;
}

td.cookie-description {
    grid-column: 1 / 3;
    grid-row: 3;
}

.cookie-name strong {
    color: #212529;
    font-size: 14px;
}

.cookie-security-badges {
    margin-top: 4px;
}

.security-badge {
    display: inline-block;
    padding: 2px 5px;
    font-size: 0.7em;
    font-weight: bold;
    border-radius: 3px;
    margin-right: 3px;
    color: white;
    text-transform: uppercase;
}

.security-badge.http-only {
    background-color: #6c757d;
}

.security-badge.secure {
    background-color: #28a745;
}

.security-badge.same-site {
    background-color: #ffc107;
    color: #212529;
}

.provider-name {
    font-weight: 500;
    color: #495057;
    font-size: 13px;
}

.provider-name::before {
    content: "Furnizor: ";
    font-weight: 400;
    color: #8a8d93;
}

.cookie-domain {
    font-family: 'Courier New', monospace;
    font-size: 0.8em;
    color: #6c757d;
    margin-top: 2px;
}

.cookie-expiry {
    white-space: nowrap;
}

.expiry-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.expiry-badge.expiry-sesiune,
.expiry-badge.expiry-session {
    background-color: #ffc107;
    color: #212529;
}

.expiry-badge.expiry-1-hour,
.expiry-badge.expiry-1-ora,
.expiry-badge.expiry-1-day,
.expiry-badge.expiry-1-zi,
.expiry-badge.expiry-24-ore,
.expiry-badge.expiry-10-minute,
.expiry-badge.expiry-10-minutes,
.expiry-badge.expiry-1-minut {
    background-color: #17a2b8;
    color: white;
}

.expiry-badge.expiry-3-luni,
.expiry-badge.expiry-90-zile {
    background-color: #28a745;
    color: white;
}

.expiry-badge.expiry-niciodata,
.expiry-badge.expiry-never,
.expiry-badge.expiry-2-ani,
.expiry-badge.expiry-1-an {
    background-color: #dc3545;
    color: white;
}

.cookie-description {
    font-size: 13px;
    color: #5c5f66;
    line-height: 1.5;
}

.no-cookies-found {
    padding: 20px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

.category-description {
    margin-bottom: 12px;
    padding: 12px 14px;
    background: #f6f7f8;
    border-radius: 12px;
    font-size: 12.5px;
    line-height: 1.5;
    color: #5c5f66;
}

.cookie-summary {
    margin-top: 20px;
    padding: 15px;
    background: #f6f7f8;
    border-radius: 12px;
}

.cookie-summary h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #495057;
    font-size: 1em;
}

.cookie-summary-list {
    margin: 0;
    padding-left: 20px;
}

.cookie-summary-list li {
    margin-bottom: 5px;
    font-size: 0.9em;
}

/* ============================================================
   MOBIL — bottom-sheet + buton floating deasupra barei aurii
   ============================================================ */

@media (max-width: 768px) {
    /* Fereastra devine bottom-sheet */
    #google-consent-mode.hard-mode {
        align-items: flex-end;
        justify-content: center;
    }

    #google-consent-mode-window {
        width: 100vw;
        max-width: 100%;
        max-height: 86vh;
        border-radius: 20px 20px 0 0;
        padding: 22px 18px calc(18px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.3);
    }

    #google-consent-mode-window-header-title {
        font-size: 18px;
    }

    #google-consent-mode-window-main-content p,
    #consent-brief-info p {
        font-size: 13.5px;
    }

    .consent-tab-content {
        max-height: 240px;
    }

    .cookie-table tbody tr {
        padding: 10px 12px;
    }

    .cookie-description {
        font-size: 12.5px;
    }

    .cookie-table-wrapper {
        max-height: 260px;
    }

    /* Butonul floating: deasupra barei aurii de jos (68px) */
    #google-consent-mode-manage-button {
        bottom: 80px;
        left: 12px;
    }

    #google-consent-manage-trigger {
        width: 46px;
        height: 46px;
    }

    #google-consent-manage-trigger svg {
        width: 22px;
        height: 22px;
    }
}
