/* Banner */
.cookie-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(12, 30, 63, 0.85);
    color: #fff;
    padding: 12px 16px;
    z-index: 999999999;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        sans-serif;
    box-sizing: border-box;
}

.cookie-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    /* flex-wrap: wrap; */
    align-items: center;
    gap: 12px;
}

.cookie-text {
    flex: 1 1 50%;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-text a {
    color: #f1f5f9;
    text-decoration: underline;
}

.cookie-actions {
    flex: 1 1 40%;
    display: flex;
    /* flex-wrap: wrap; */
    justify-content: flex-end;
    gap: 8px;
}

/* Botões */
.cookie-btn {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid #ffffff;
    background: transparent;
    color: #ffffff;
    transition: background-color 0.15s ease, color 0.15s ease,
        border-color 0.15s ease;
}

button#cookie-modal-reject {
    color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
}

.cookie-btn-outline:hover {
    background-color: rgba(35, 83, 172, 0.2);
}

.cookie-btn-primary {
    background-color: #2563eb;
    border-color: #2563eb;
}

.cookie-btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

/* Modal */
.cookie-modal {
    position: fixed;
    inset: 0;
    display: none; /* controlado via classe .is-visible */
    z-index: 1000000000;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        sans-serif;
}

.cookie-modal.is-visible {
    display: block;
}

.cookie-modal-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.25);
}

.cookie-modal-dialog {
    position: absolute;
    left: 50%;
    bottom: 25%;
    transform: translateX(-50%);
    width: min(600px, 100% - 32px);
    background-color: #ffffff;
    color: #0f172a;
    border-radius: 8px;
    padding: 20px 22px 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35);
    box-sizing: border-box;
}

.cookie-modal-title {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
}

.cookie-groups-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 55vh;
    overflow-y: auto;
    margin-top: 8px;
}

/* Grupo */
.cookie-group {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 10px;
}

.cookie-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cookie-group-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.cookie-group-header-main {
    flex: 1;
}

.cookie-group-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
}

.cookie-group-description {
    font-size: 13px;
    line-height: 1.5;
}

/* Cookie individual */
.cookie-item {
    margin-top: 8px;
    margin-left: 20px;
}

.cookie-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.cookie-item-title {
    font-weight: 700;
    font-size: 14px;
    flex: 1;
}

.cookie-item-description {
    margin-top: 3px;
    font-size: 13px;
    line-height: 1.5;
}

/* Toggle simples (checkbox estilizado bem básico) */
.cookie-toggle {
    position: relative;
    width: 40px;
    height: 20px;
    flex-shrink: 0;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #e5e7eb;
    border-radius: 999px;
    transition: 0.2s;
}

.cookie-toggle-slider::before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 2px;
    top: 2px;
    background-color: white;
    border-radius: 50%;
    transition: 0.2s;
}

/* Checked */
.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #2563eb;
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
    transform: translateX(20px);
}

/* Rodapé modal */
.cookie-modal-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 18px;
}

@media (max-width: 1144.98px) {
    .cookie-container {
        flex-direction: column;
    }
}

@media (max-width: 575.98px) {
    .cookie-actions {
        flex-direction: column;
    }
}