﻿.toast-stack {
    position: fixed;
    right: 16px;
    bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
    max-width: min(420px, calc(100vw - 32px));
}

.toast-card {
    display: grid;
    grid-template-columns: 28px 1fr 28px;
    align-items: start;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-sm);
    border-radius: var(--border-radius-default);
    background: var(--surface-default);
    box-shadow: var(--elevation-overlay);
    border: var(--outline-size-default) solid var(--neutral-10);
    animation: toastIn .16s ease-out;
}

@keyframes toastIn {
    from {
        transform: translateY(6px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}


.toast-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-weight: 700;
    background: rgba(0,0,0,.06);
}

.toast-content {
    padding-top: 1px;
}

.toast-title {
    font-weight: 700;
    margin-bottom: 2px;
}

.toast-message {
    opacity: .9;
    line-height: 1.25rem;
}

.toast-close {
    border: 0;
    background: transparent;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    opacity: .6;
    padding: 4px;
}

    .toast-close:hover {
        opacity: 1;
    }

/* cores por tipo */
.toast-success {
    border-left: 4px solid var(--surface-success);
}

.toast-error {
    border-left: 4px solid var(--surface-primary-default);
}

.toast-warning {
    border-left: 4px solid var(--surface-warning);
}

.toast-info {
    border-left: 4px solid var(--surface-info);
}

.toast-success .toast-icon {
    background: var(--surface-success-light);
}

.toast-error .toast-icon {
    background: var(--surface-primary-light);
}

.toast-warning .toast-icon {
    background: var(--surface-warning-light);
}

.toast-info .toast-icon {
    background: var(--surface-info-light);
}

.dlg-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    display: grid;
    place-items: center;
    z-index: 10000;
    padding: 16px;
}

.dlg-card {
    width: min(520px, 100%);
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 18px 45px rgba(0,0,0,.18);
    animation: dlgIn .14s ease-out;
}

@keyframes dlgIn {
    from {
        transform: translateY(8px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.dlg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px 10px 14px;
    border-bottom: none !important;
}

.dlg-title {
    font-weight: 800;
    font-size: 1.05rem;
}

.dlg-x {
    border: 0;
    background: transparent;
    cursor: pointer;
    opacity: .65;
    padding: 6px 8px;
    border-radius: 10px;
}

    .dlg-x:hover {
        opacity: 1;
        background: rgba(0,0,0,.06);
    }

.dlg-body {
    padding: 0 14px 12px 14px;
    line-height: 1.35rem;
    opacity: .95;
}

.dlg-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 12px 14px 14px 14px;
}

.dlg-btn {
    border: 1px solid rgba(0,0,0,.12);
    background: #fff;
    padding: 9px 12px;
    border-radius: 12px;
    cursor: pointer;
}

    .dlg-btn:hover {
        background: rgba(0,0,0,.04);
    }

.dlg-primary {
    border: 0;
    background: rgba(2,119,189,.12);
}

    .dlg-primary:hover {
        background: rgba(2,119,189,.18);
    }

.dlg-danger {
    background: rgba(198,40,40,.12);
}

    .dlg-danger:hover {
        background: rgba(198,40,40,.18);
    }

.body-no-scroll {
    overflow: hidden !important;
}






.sidebar-table {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
}

/* search */
.sidebar-search {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

    .sidebar-search input {
        width: 100%;
        padding: 6px 8px;
        font-size: 14px;
    }

/* lista */
.sidebar-list {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* cada linha (estilo tabela) */
.sidebar-row {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f1f1f1;
    font-size: 14px;
}

    .sidebar-row:hover {
        background: #f5f7fa;
    }

    /* selecionado */
    .sidebar-row.active {
        background: #e8f2ff;
        font-weight: 600;
        border-left: 4px solid #0d6efd;
    }

.sidebar-table {
    width: 100%;
    max-width: 200px;
}

/* --- Language selector --- */
.lang-switch {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    width: 85px;
    height: 40px;
}

.lang-switch .lang-current {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 8px 16px;
    gap: 8px;
    width: 85px;
    height: 40px;
    background: var(--neutral-0, #fff);
    border: 1px solid var(--neutral-60, #6f7070);
    border-radius: 8px;
    cursor: pointer;
}

/* Current (selected) flag only */
.lang-switch .lang-current img {
    width: 21px;
    height: auto;
    object-fit: contain;
}

.lang-switch .lang-current .lang-chevron {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lang-switch .lang-current .lang-chevron svg {
    width: 20px;
    height: 20px;
    display: block;
}

.lang-switch .lang-current .lang-chevron path {
    fill: none;
    stroke: var(--primary-500, #dc3228);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lang-switch .lang-current .lang-chevron.is-open {
    transform: rotate(180deg);
}

.lang-switch .lang-menu {
    position: absolute;
    right: 0;
    top: 110%;
    background: var(--neutral-0, #fff);
    border-radius: 4px;
    box-shadow: 0 10px 25px rgba(0,0,0,.12);
    border: 1px solid rgba(0,0,0,.06);
    padding: 0;
    width: 260px;
    z-index: 9999;
}

.lang-switch .lang-item {
    box-sizing: border-box;
    position: relative;
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 56px;
    padding: 16px 24px;
    cursor: pointer;
}

.lang-switch .lang-item + .lang-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    border-top: 1px solid var(--neutral-20, #d9d9d9);
}

.lang-switch .lang-item:hover {
    background: #f3f4f6;
}

.lang-switch .lang-item img {
    width: 32px;
    height: auto;
    object-fit: contain;
}

.lang-switch .lang-item span {
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
}

.lang-switch .lang-item.selected span {
    font-weight: 700;
}

.lang-switch .lang-item .lang-selected-check {
    margin-left: auto;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lang-switch .lang-item .lang-selected-check svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* --- Language selector overlay (click-outside-to-close) --- */
.lang-switch .lang-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: transparent;
    cursor: default;
}


/* ====== Dialog actions ====== */

.mc-dialog-actions-column-right {
    text-align: right;
    padding-top: 13px;
}

.mc-dialog-actions-col-cell {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem; /* espaçamento entre botões */
}