
/* ═══════════════════════════════════════════════════════════════════════════
   VARIANT: bottom  (full-width bar)
   ═══════════════════════════════════════════════════════════════════════════ */
.cs-banner--bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    font-family: inherit;
}

.cs-banner--bottom #cookiescript_injected {
    background: var(--cs-bg);
    border-top: 1px solid var(--cs-border);
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.10);
    width: 100%;
    box-sizing: border-box;
    outline: none;
}

.cs-banner--bottom .cookiescript_mainpart {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px 12px;
    box-sizing: border-box;
}

.cs-banner--bottom #cookiescript_toppart {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.cs-banner--bottom #cookiescript_leftpart {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
}

.cs-banner--bottom #cookiescript_rightpart {
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
}

.cs-banner--bottom #cookiescript_buttons {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 160px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   VARIANT: left / right  (minimal card)
   ═══════════════════════════════════════════════════════════════════════════ */
.cs-banner--left,
.cs-banner--right {
    position: fixed;
    bottom: 24px;
    z-index: 99999;
    font-family: inherit;
    width: 300px;
}

.cs-banner--left  { left:  20px; }
.cs-banner--right { right: 20px; }

.cs-banner--left #cookiescript_injected,
.cs-banner--right #cookiescript_injected {
    background: var(--cs-bg);
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-card-radius);
    box-shadow: var(--cs-card-shadow);
    outline: none;
    overflow: hidden;
}

.cs-banner--left .cookiescript_mainpart,
.cs-banner--right .cookiescript_mainpart {
    padding: 18px 18px 14px;
}

.cs-banner--left #cookiescript_toppart,
.cs-banner--right #cookiescript_toppart {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cs-banner--left #cookiescript_leftpart,
.cs-banner--right #cookiescript_leftpart {
    width: 100%;
}

.cs-banner--left #cookiescript_rightpart,
.cs-banner--right #cookiescript_rightpart {
    width: 100%;
}

.cs-banner--left #cookiescript_buttons,
.cs-banner--right #cookiescript_buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 7px;
    width: 100%;
}

.cs-banner--left #cookiescript_buttons > div,
.cs-banner--right #cookiescript_buttons > div {
    flex: 1;
}


/* ── Shared banner inner elements ───────────────────────────────────────────── */
/* ── Header & description ───────────────────────────────────────────────────── */
#cookiescript_header {
    font-size: 18px;
    font-weight: 700;
    color: var(--cs-text);
    margin-bottom: 15px;
    /*text-transform: var(--cs-text-transform);*/
}

#cs_modal_intro_desc{
	padding: 14px 22px;
	font-size: 12px;
	color: var(--cs-subtext);
}


#cs_modal_intro_title{
	padding: 10px 22px;
	font-weight: bold;
	color: var(--cs-text);
}

#cookiescript_description {
    font-size: 12px;
    color: var(--cs-subtext);
    line-height: 1.55;
    margin-bottom: 10px;
}

/* ── Checkboxes row ─────────────────────────────────────────────────────────── */
#cookiescript_checkboxs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-bottom: 8px;
}

.cookiescript_checkbox {
    display: flex;
    align-items: center;
    gap: 7px;
}

.cookiescript_checkbox_label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
}

.cookiescript_checkbox_text {
    font-size: 12px;
    font-weight: 600;
    color: var(--cs-text);
    white-space: nowrap;
}

/* ── MDC Checkbox ───────────────────────────────────────────────────────────── */
.mdc-checkbox {
    position: relative;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.mdc-checkbox__native-control {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
    margin: 0;
}

.mdc-checkbox__native-control:disabled {
    cursor: not-allowed;
}

.mdc-checkbox__background {
    position: absolute;
    inset: 0;
    border: 2px solid var(--cs-checkbox-off);
    border-radius: 3px;
    background: var(--cs-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s;
    pointer-events: none;
}

.mdc-checkbox__native-control:checked + .mdc-checkbox__background,
.mdc-checkbox__native-control:disabled + .mdc-checkbox__background {
    background: var(--cs-checkbox-on);
    border-color: var(--cs-checkbox-on);
}

.mdc-checkbox__checkmark {
    width: 11px;
    height: 11px;
}

.mdc-checkbox__checkmark-path {
    stroke: var(--cs-checkbox-check);
    stroke-width: 4px;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    transition: stroke-dashoffset 0.15s ease;
}

.mdc-checkbox__native-control:checked + .mdc-checkbox__background .mdc-checkbox__checkmark-path,
.mdc-checkbox__native-control:disabled + .mdc-checkbox__background .mdc-checkbox__checkmark-path {
    stroke-dashoffset: 0;
}

/* ── Manage / show details ──────────────────────────────────────────────────── */
#cookiescript_manage_wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-top: auto;
    padding-top: 8px;
    color: var(--cs-manage-color);
    font-size: 11px;
    font-weight: 500;
    text-transform: var(--cs-text-transform);
}

#cookiescript_manage_wrap:hover {
    text-decoration: underline;
}

#cookiescript_manage {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 500;
    color: var(--cs-manage-color);
}

#cookiescript_manage:hover {
    text-decoration: underline;
}

#cookiescript_manageicon {
    width: 12px;
    height: 12px;
    fill: var(--cs-manage-color);
}

.cookiescript_gear {
    fill: var(--cs-manage-color);
}

/* ── Buttons ────────────────────────────────────────────────────────────────── */
#cookiescript_buttons > div {
    font-size: 14px;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: var(--cs-btn-radius);
    border: 1.5px solid transparent;
    cursor: pointer;
    text-transform: var(--cs-text-transform);
    text-align: center;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
    user-select: none;
    line-height: 1;
}

#cookiescript_accept {
    background: var(--cs-btn-accept-bg);
    color: var(--cs-btn-accept-text);
    border-color: var(--cs-btn-accept-bg);
}
#cookiescript_accept:hover {
    background: var(--cs-btn-accept-bg-hover);
    border-color: var(--cs-btn-accept-bg-hover);
}

#cookiescript_save {
    background: var(--cs-btn-save-bg);
    color: var(--cs-btn-save-text);
    border-color: var(--cs-btn-save-border);
}
#cookiescript_save:hover { background: var(--cs-btn-save-bg-hover); }

#cookiescript_reject {
    background: var(--cs-btn-reject-bg);
    color: var(--cs-btn-reject-text);
    border-color: var(--cs-btn-reject-border);
}
#cookiescript_reject:hover {
    background: var(--cs-btn-reject-bg-hover);
    color: var(--cs-btn-reject-text-hover);
}

/* ── Details modal overlay ──────────────────────────────────────────────────── */
#cs_modal_overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 16px;
    box-sizing: border-box;
}

#cs_modal_overlay.cs-modal--open {
    background: var(--cs-modal-overlay-bg);
}

#cs_modal {
    background: var(--cs-bg);
    border-radius: var(--cs-modal-radius);
    box-shadow: var(--cs-modal-shadow);
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

#cs_modal_overlay.cs-modal--open #cs_modal {
    transform: translateY(0);
    opacity: 1;
}

/* ── Modal header ───────────────────────────────────────────────────────────── */
#cs_modal_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px 14px;
    border-bottom: 1px solid var(--cs-border);
    background: var(--cs-bg-header);
    flex-shrink: 0;
}

#cs_modal_title {
    font-size: 16px;
    font-weight: 700;
    color: var(--cs-text);
}

#cs_modal_close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: var(--cs-subtext);
    cursor: pointer;
    padding: 0 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#cs_modal_close:hover {
    color: var(--cs-text);
}

/* ── Modal body ─────────────────────────────────────────────────────────────── */
#cs_modal_body {
    overflow-y: auto;
    flex: 1;
    padding: 6px 0;
}

.cs-modal-row {
    border-bottom: 1px solid #f0f0f0;
    padding: 14px 22px;
}

.cs-modal-row:last-child {
    border-bottom: none;
}

.cs-modal-row__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cs-modal-row__info {
    flex: 1;
}

.cs-modal-row__label {
    font-size: 14px;
    font-weight: 600;
    color: var(--cs-text);
    margin-bottom: 3px;
}

.cs-modal-row__desc {
    font-size: 12px;
    color: var(--cs-subtext);
    line-height: 1.5;
}

.cs-modal-row__toggle {
    flex-shrink: 0;
    padding-top: 2px;
}

/* ── Details toggle link ────────────────────────────────────────────────────── */
.cs-details-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    color: var(--cs-accent);
}

.cs-details-toggle:hover {
    text-decoration: underline;
}

.cs-details-toggle__icon {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

/* ── Cookie details table ───────────────────────────────────────────────────── */
.cs-cookie-table-wrap {
    margin-top: 8px;
    overflow-x: auto;
    border-radius: 6px;
    border: 1px solid var(--cs-border);
}

.cs-cookie-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    color: var(--cs-subtext);
}

.cs-cookie-table thead tr {
    background: var(--cs-bg-table-head);
}

.cs-cookie-table th {
    padding: 7px 10px;
    font-weight: 600;
    color: var(--cs-text);
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid var(--cs-border);
}

.cs-cookie-table td {
    padding: 7px 10px;
    vertical-align: top;
    border-bottom: 1px solid #f5f5f5;
    line-height: 1.45;
}

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

.cs-cookie-table tbody tr:nth-child(even) {
    background: var(--cs-bg-table-row-alt);
}

.cs-ct-name {
    font-family: monospace;
    font-size: 11px;
    color: var(--cs-text);
    white-space: nowrap;
    font-weight: 500;
}

.cs-ct-duration {
    white-space: nowrap;
    color: var(--cs-text-muted);
}

.cs-modal-always-on {
    font-size: 11px;
    font-weight: 600;
    color: var(--cs-always-on-color);
    white-space: nowrap;
}

/* ── Toggle switch ──────────────────────────────────────────────────────────── */
.cs-toggle {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    cursor: pointer;
}

.cs-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.cs-toggle__track {
    position: absolute;
    inset: 0;
    background: var(--cs-toggle-off);
    border-radius: 24px;
    transition: background 0.2s;
}

.cs-toggle__track::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: var(--cs-toggle-knob);
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cs-toggle input:checked + .cs-toggle__track {
    background: var(--cs-toggle-on);
}

.cs-toggle input:checked + .cs-toggle__track::before {
    transform: translateX(18px);
}

.cs-toggle--always-on {
    cursor: default;
    opacity: 0.7;
}

/* ── Modal footer ───────────────────────────────────────────────────────────── */
#cs_modal_footer {
    display: flex;
    padding: 14px 22px;
    border-top: 1px solid var(--cs-border);
    justify-content: flex-end;
    flex-shrink: 0;
    flex-wrap: wrap;
}

#cs_modal_footer > div {
    font-size: 13px;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: var(--cs-btn-radius);
    border: 1.5px solid transparent;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
    user-select: none;
    line-height: 1;
}

#csm_accept {
    background: var(--cs-btn-accept-bg);
    color: var(--cs-btn-accept-text);
    border-color: var(--cs-btn-accept-bg);
}
#csm_accept:hover {
    background: var(--cs-btn-accept-bg-hover);
    border-color: var(--cs-btn-accept-bg-hover);
}

#csm_save {
    background: var(--cs-btn-save-bg);
    color: var(--cs-btn-save-text);
    border-color: var(--cs-btn-save-border);
}
#csm_save:hover { background: var(--cs-btn-save-bg-hover); }

#csm_reject {
    background: var(--cs-btn-reject-bg);
    color: var(--cs-btn-reject-text);
    border-color: var(--cs-btn-reject-border);
}
#csm_reject:hover { background: var(--cs-btn-reject-bg-hover); color: var(--cs-btn-reject-text-hover); }

@media (max-width: 480px) {
    #cs_modal_footer {
        flex-direction: column-reverse;
    }
    #cs_modal_footer > div {
        width: 100%;
        text-align: center;
    }
}

/* ── Floating re-open button ────────────────────────────────────────────────── */
#cs_prefs_btn {
    position: fixed;
    bottom: 16px;
    z-index: 9999;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--cs-fab-bg);
    color: var(--cs-fab-text);
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--cs-fab-shadow);
    transition: background 0.15s, transform 0.15s;
    padding: 0;
}

#cs_prefs_btn.cs-prefs-btn--left  { left:  16px; }
#cs_prefs_btn.cs-prefs-btn--right { right: 16px; }

#cs_prefs_btn:hover {
    background: var(--cs-fab-bg-hover);
    transform: scale(1.08);
}

/* ── Cookie table — mobile stacked layout ───────────────────────────────────── */
@media (max-width: 560px) {
    .cs-cookie-table thead {
        display: none;
    }

    .cs-cookie-table tbody tr {
        display: block;
        border-bottom: 1px solid var(--cs-border);
        padding: 8px 0;
    }

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

    .cs-cookie-table tbody tr:nth-child(even) {
        background: none;
    }

    .cs-cookie-table td {
        display: grid;
        grid-template-columns: 80px 1fr;
        gap: 4px 10px;
        padding: 3px 10px;
        border-bottom: none;
    }

    .cs-cookie-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--cs-text);
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        align-self: start;
        padding-top: 1px;
    }
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
    .cs-banner--bottom #cookiescript_toppart {
        flex-direction: column;
        gap: 14px;
    }

    .cs-banner--bottom #cookiescript_rightpart {
        width: 100%;
    }

    .cs-banner--bottom #cookiescript_buttons {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        min-width: unset;
    }

    .cs-banner--bottom #cookiescript_buttons > div {
        flex: 1;
        min-width: 120px;
    }
}
