/*
 * SIARAS - consimtamant cookie.
 * Stiluri proprii, pe tokenii MUD. Culoarea de brand vine din tema
 * (var(--blue-sky-600), remapata pe rosu in siaras-mud-theme.css),
 * deci nu se hardcodeaza niciun hex de brand aici.
 */

.cc-banner,
.cc-modal,
.cc-placeholder {
    font-family: var(--font-family-base, 'Onest', sans-serif);
    color: var(--gray-900, #121212);
    box-sizing: border-box;
}

.cc-banner *,
.cc-modal *,
.cc-placeholder * {
    box-sizing: border-box;
}

/* ---------------------------------------------------------------- */
/* Butoane                                                           */
/* ---------------------------------------------------------------- */

.cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 9999px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.cc-btn--primary {
    background: var(--blue-sky-600, #b32318);
    border-color: var(--blue-sky-600, #b32318);
    color: #fff;
}

.cc-btn--primary:hover {
    background: var(--blue-sky-700, #912018);
    border-color: var(--blue-sky-700, #912018);
}

.cc-btn--secondary {
    background: transparent;
    border-color: var(--blue-sky-600, #b32318);
    color: var(--blue-sky-600, #b32318);
}

.cc-btn--secondary:hover {
    background: var(--blue-sky-700, #912018);
    border-color: var(--blue-sky-700, #912018);
    color: #fff;
}

.cc-btn--ghost {
    background: transparent;
    border-color: var(--gray-300, #b2b2b2);
    color: var(--gray-900, #121212);
}

.cc-btn--ghost:hover {
    background: var(--gray-100, #f5f5f5);
}

.cc-btn--link {
    background: none;
    border: none;
    padding: 10px 4px;
    color: var(--blue-sky-600, #b32318);
    text-decoration: underline;
}

.cc-btn--link:hover {
    text-decoration: none;
}

/* ---------------------------------------------------------------- */
/* Bara de jos                                                       */
/* ---------------------------------------------------------------- */

.cc-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9000;
    background: #fff;
    border-top: 3px solid var(--blue-sky-600, #b32318);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, .12);
    padding: 20px 0;
}

.cc-banner[hidden],
.cc-modal[hidden] {
    display: none !important;
}

.cc-banner__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.cc-banner__content {
    flex: 1 1 auto;
    min-width: 0;
}

.cc-banner__title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.cc-banner__text {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--gray-600, #666);
}

.cc-banner__text a,
.cc-links a {
    color: var(--blue-sky-600, #b32318);
    text-decoration: underline;
}

.cc-banner__text a:hover,
.cc-links a:hover {
    text-decoration: none;
}

.cc-links {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    font-size: 13px;
}

.cc-banner__actions {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 220px;
}

.cc-banner__actions .cc-btn {
    width: 100%;
}

/* ---------------------------------------------------------------- */
/* Modal preferinte                                                  */
/* ---------------------------------------------------------------- */

.cc-modal {
    position: fixed;
    inset: 0;
    z-index: 9500;
    background: rgba(0, 0, 0, .5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

body.cc-modal-open {
    overflow: hidden;
}

.cc-modal__dialog {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 900px;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cc-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200, #e0e0e0);
}

.cc-modal__title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.cc-modal__close {
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: var(--gray-600, #666);
    padding: 0 4px;
}

.cc-modal__close:hover {
    color: var(--gray-900, #121212);
}

.cc-modal__body {
    padding: 20px 24px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
}

.cc-modal__intro {
    margin: 0 0 8px;
    color: var(--gray-600, #666);
}

.cc-note {
    margin: 16px 0 0;
    padding: 12px 16px;
    background: var(--gray-100, #f5f5f5);
    border-left: 3px solid var(--blue-sky-600, #b32318);
    border-radius: 6px;
    font-size: 13px;
    color: var(--gray-600, #666);
}

.cc-modal__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid var(--gray-200, #e0e0e0);
    background: var(--gray-100, #f8f9fa);
}

.cc-modal__footer .cc-btn {
    flex: 1 1 180px;
}

/* Categorii (acordeon) */

.cc-cat {
    border: 1px solid var(--gray-200, #e0e0e0);
    border-radius: 8px;
    margin-top: 12px;
    overflow: hidden;
}

.cc-cat__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
}

.cc-cat__toggle {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.cc-cat__chevron {
    flex: none;
    width: 16px;
    height: 16px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform .15s ease-in-out;
}

.cc-cat__toggle[aria-expanded="true"] .cc-cat__chevron {
    transform: rotate(-135deg) translate(-4px, -4px);
}

.cc-cat__panel {
    padding: 0 16px 16px;
    border-top: 1px solid var(--gray-200, #e0e0e0);
}

.cc-cat__desc {
    margin: 12px 0;
    color: var(--gray-600, #666);
}

/* Switch */

.cc-switch {
    flex: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--gray-600, #666);
    cursor: pointer;
}

.cc-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cc-switch__ui {
    width: 44px;
    height: 24px;
    border-radius: 9999px;
    background: var(--gray-300, #b2b2b2);
    position: relative;
    transition: background-color .2s ease;
    flex: none;
}

.cc-switch__ui::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform .2s ease;
}

.cc-switch input:checked + .cc-switch__ui {
    background: var(--blue-sky-600, #b32318);
}

.cc-switch input:checked + .cc-switch__ui::after {
    transform: translateX(20px);
}

.cc-switch input:focus-visible + .cc-switch__ui {
    outline: 2px solid var(--blue-sky-600, #b32318);
    outline-offset: 2px;
}

.cc-switch input:disabled + .cc-switch__ui {
    background: var(--blue-sky-600, #b32318);
    opacity: .45;
    cursor: not-allowed;
}

/* Tabel cookie-uri */

.cc-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--gray-200, #e0e0e0);
    border-radius: 6px;
}

.cc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 640px;
}

.cc-table th,
.cc-table td {
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--gray-200, #e0e0e0);
}

.cc-table th {
    background: var(--gray-100, #f5f5f5);
    font-weight: 600;
    white-space: nowrap;
}

.cc-table tr:last-child td {
    border-bottom: none;
}

.cc-table code {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 12px;
    word-break: break-all;
}

.cc-muted {
    color: var(--gray-600, #666);
    font-size: 12px;
}

.cc-table__empty {
    margin: 12px 0 0;
    color: var(--gray-600, #666);
    font-size: 13px;
}

.cc-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    background: var(--gray-100, #f5f5f5);
    color: var(--gray-600, #666);
}

.cc-pill--on {
    background: var(--green-100, #e6f5ee);
    color: var(--green-800, #05603a);
}

.cc-extra {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200, #e0e0e0);
}

.cc-extra__title {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
}

/* ---------------------------------------------------------------- */
/* Placeholder pentru embed-uri blocate                              */
/* ---------------------------------------------------------------- */

.cc-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    padding: 24px;
    background: var(--gray-100, #f5f5f5);
    border: 1px dashed var(--gray-300, #b2b2b2);
    border-radius: 8px;
    text-align: center;
}

.cc-placeholder__title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
}

.cc-placeholder__text {
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--gray-600, #666);
}

.cc-placeholder__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.cc-embed-blocked {
    display: none !important;
}

/* ---------------------------------------------------------------- */
/* Mobil                                                             */
/* ---------------------------------------------------------------- */

@media (max-width: 767px) {
    .cc-banner {
        top: 0;
        bottom: 0;
        overflow-y: auto;
        padding: 0;
        border-top: none;
        display: flex;
        align-items: flex-end;
    }

    .cc-banner__inner {
        flex-direction: column;
        gap: 16px;
        background: #fff;
        border-top: 3px solid var(--blue-sky-600, #b32318);
        border-radius: 12px 12px 0 0;
        padding: 20px 16px;
        width: 100%;
    }

    .cc-banner__actions {
        width: 100%;
        min-width: 0;
    }

    .cc-modal {
        padding: 0;
    }

    .cc-modal__dialog {
        border-radius: 0;
        max-width: none;
        height: 100%;
        max-height: none;
    }

    .cc-modal__footer .cc-btn {
        flex: 1 1 100%;
    }

    .cc-cat__head {
        flex-wrap: wrap;
    }
}
