/* components/editor/modulos/tags/tags.css */

.codex-card-completo {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 18px;
    position: relative;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px; /* Espaço entre as linhas do card */
}

/* Botão Remover Card (X) */
.btn-remover-card {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ef4444;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* NOVA LINHA SUPERIOR: BARRA ENCURTADA + BOTOES */
.codex-top-inline-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.codex-search-wrapper {
    position: relative;
    flex: 1; /* Ocupa o máximo de espaço disponível, mas encurta para dar lugar aos botões */
}

.codex-search-wrapper input {
    width: 100%;
    padding: 10px 40px 10px 12px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    font-size: 13px;
}

.btn-trigger-browser {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: #6366f1;
    font-size: 16px;
    border: none;
    cursor: pointer;
}

.amt-group-inline {
    display: flex;
    gap: 5px;
    flex-shrink: 0; /* Impede que os botões A M T encolham */
}

.btn-amt-toggle {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #334155;
    background: rgba(255,255,255,0.05);
    color: #94a3b8;
    font-weight: 800;
    cursor: pointer;
    font-size: 11px;
}

.btn-amt-toggle.active {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

/* INPUTS MANUAIS CONDICIONAIS */
.amt-inputs-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.amt-inputs-row input, .amt-inputs-row select {
    background: #0f172a;
    border: 1px solid #334155;
    padding: 8px;
    border-radius: 4px;
    color: white;
    font-size: 12px;
}

.hidden { display: none !important; }

/* GRADE DE BAIXO */
.codex-bottom-grid {
    display: grid;
    grid-template-columns: 1.2fr 1.2fr 0.6fr; /* Ajustado para dar mais espaço às listas */
    gap: 12px;
}

.field-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-column label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
}

.input-with-plus {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 4px;
}

.input-with-plus input {
    flex: 1;
    background: #0f172a;
    border: 1px solid #334155;
    padding: 8px;
    border-radius: 4px;
    color: white;
    font-size: 13px;
    width: 100%;
}

.btn-add-field {
    color: #6366f1;
    cursor: pointer;
    font-size: 14px;
}

.btn-new-card-footer {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px dashed #334155;
    color: #94a3b8;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

/* Remover setas de input number */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.field-column input {
    width: 100%;
    background: #0f172a;
    border: 1px solid #334155;
    padding: 8px;
    border-radius: 4px;
    color: white;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.field-column input:focus {
    border-color: var(--primary);
}

/* components/editor/modulos/tags/tags.css */

/* Contentor de resultados (Dropdown) */
.tags-search-results {
    background: #111827; /* Fundo mais profundo */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-top: 8px;
    overflow: hidden;
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.5);
    max-height: 250px;
    overflow-y: auto;
}

/* Item individual de resultado */
.neuronio-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.neuronio-result-item:last-child {
    border-bottom: none;
}

.neuronio-result-item:hover {
    background: rgba(99, 102, 241, 0.1); /* Indigo transparente */
}

.neuronio-result-item:hover i.fa-plus-circle {
    opacity: 1 !important;
    color: var(--primary);
}

/* Caixa do ícone à esquerda */
.result-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.result-icon-box.biblia {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
}

.result-icon-box.cosmos {
    background: rgba(212, 157, 6, 0.15);
    color: #d49d06;
}

/* Contentor para alinhar várias etiquetas lado a lado */
.pill-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

/* Estilo Base da Pill */
.neuronio-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px; /* Arredondado */
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Variação Bíblia */
.neuronio-pill.biblia {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-color: rgba(99, 102, 241, 0.2);
}

/* Variação Cosmos */
.neuronio-pill.cosmos {
    background: rgba(212, 157, 6, 0.1);
    color: #d49d06;
    border-color: rgba(212, 157, 6, 0.2);
}

/* Ícone de fechar (X) dentro da pill */
.neuronio-pill .remove-icon {
    cursor: pointer;
    opacity: 0.5;
    font-size: 14px;
    transition: opacity 0.2s;
}

.neuronio-pill .remove-icon:hover {
    opacity: 1;
    color: #ef4444; /* Vermelho ao passar o rato */
}

/* No ficheiro components/editor/modulos/tags/tags.css */

.pill-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.neuronio-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05); /* Fundo visível */
    color: white;
}

.neuronio-pill .remove-icon {
    cursor: pointer;
    opacity: 0.6;
}

.neuronio-pill .remove-icon:hover {
    color: #ef4444;
    opacity: 1;
}