/* 
 WM Translate — style.css
 Frontend: seletor de idioma + editor visual
 Admin: painel de gestão
 */

/* Variáveis */
:root {
 --wmt-primary: #2271b1;
 --wmt-primary-dark: #135e96;
 --wmt-success: #00a32a;
 --wmt-error: #d63638;
 --wmt-bg: #fff;
 --wmt-border: #c3c4c7;
 --wmt-radius: 6px;
 --wmt-shadow: 0 4px 20px rgba(0,0,0,.18);
 --wmt-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* 
 FRONTEND — Seletor de idioma
 */

.wmt-switcher {
 display: inline-flex;
 align-items: center;
 gap: 6px;
 font-family: var(--wmt-font);
}

/* Estilo lista (links) */
.wmt-switcher--list .wmt-lang-btn {
 display: inline-block;
 padding: 5px 12px;
 border: 1px solid var(--wmt-border);
 border-radius: var(--wmt-radius);
 text-decoration: none;
 color: inherit;
 font-size: .875rem;
 transition: background .15s, border-color .15s;
}

.wmt-switcher--list .wmt-lang-btn:hover {
 background: #f0f0f1;
 border-color: var(--wmt-primary);
}

.wmt-switcher--list .wmt-lang-btn.wmt-active {
 background: var(--wmt-primary);
 border-color: var(--wmt-primary);
 color: #fff;
}

/* Estilo dropdown */
.wmt-switcher--dropdown select {
 padding: 5px 10px;
 border: 1px solid var(--wmt-border);
 border-radius: var(--wmt-radius);
 font-size: .875rem;
 cursor: pointer;
}

/* 
 FRONTEND — Editor visual
 */

/* Toolbar topo */
#wmt-toolbar {
 position: fixed;
 top: 0;
 left: 0;
 right: 0;
 z-index: 999990;
 display: flex;
 align-items: center;
 gap: 16px;
 padding: 0 20px;
 height: 42px;
 background: #1d2327;
 color: #fff;
 font-family: var(--wmt-font);
 font-size: .8125rem;
 box-shadow: 0 2px 8px rgba(0,0,0,.4);
}

#wmt-toolbar-label { font-weight: 600; }
#wmt-toolbar-lang { color: #c3c4c7; }

#wmt-toolbar-close {
 margin-left: auto;
 color: #c3c4c7;
 text-decoration: none;
 transition: color .15s;
}
#wmt-toolbar-close:hover { color: #fff; }

/* Empurrar conteúdo da página */
body[data-wmt-editor="1"] {
 padding-top: 42px !important;
}

/* Elementos clicáveis */
.wmt-clickable {
 cursor: pointer;
 outline: 2px dashed rgba(34, 113, 177, .4) !important;
 outline-offset: 2px;
 transition: outline-color .15s, background .15s;
}
.wmt-clickable:hover {
 outline-color: var(--wmt-primary) !important;
 background: rgba(34, 113, 177, .08) !important;
}

/* Overlay escuro */
#wmt-overlay {
 position: fixed;
 inset: 0;
 background: rgba(0,0,0,.5);
 z-index: 999991;
 backdrop-filter: blur(2px);
}

/* Painel de tradução */
#wmt-panel {
 position: fixed;
 top: 50%;
 left: 50%;
 transform: translate(-50%, -50%);
 z-index: 999992;
 width: min(520px, 92vw);
}

#wmt-panel-inner {
 background: var(--wmt-bg);
 border-radius: 10px;
 box-shadow: var(--wmt-shadow);
 padding: 24px 28px 20px;
 font-family: var(--wmt-font);
}

#wmt-panel-inner h4 {
 margin: 0 0 16px;
 font-size: 1.0625rem;
 color: #1d2327;
}

#wmt-panel-inner label {
 display: block;
 margin-bottom: 4px;
 font-size: .8125rem;
 font-weight: 600;
 color: #3c434a;
}

#wmt-panel-inner textarea {
 width: 100%;
 box-sizing: border-box;
 border: 1px solid var(--wmt-border);
 border-radius: var(--wmt-radius);
 padding: 8px 10px;
 font-size: .875rem;
 font-family: var(--wmt-font);
 resize: vertical;
 margin-bottom: 14px;
 transition: border-color .15s;
}

#wmt-panel-inner textarea:focus {
 border-color: var(--wmt-primary);
 outline: none;
 box-shadow: 0 0 0 2px rgba(34,113,177,.2);
}

#wmt-original { background: #f6f7f7; color: #50575e; }

#wmt-panel-actions {
 display: flex;
 gap: 8px;
 justify-content: flex-end;
 margin-top: 4px;
}

/* Botões do painel */
.wmt-btn {
 padding: 7px 18px;
 border-radius: var(--wmt-radius);
 border: 1px solid var(--wmt-border);
 background: #f6f7f7;
 font-size: .875rem;
 cursor: pointer;
 transition: background .15s;
}
.wmt-btn:hover { background: #e9e9e9; }

.wmt-btn-primary {
 background: var(--wmt-primary);
 border-color: var(--wmt-primary-dark);
 color: #fff;
}
.wmt-btn-primary:hover { background: var(--wmt-primary-dark); }

/* Mensagem de estado */
#wmt-panel-msg {
 margin-top: 10px;
 font-size: .8125rem;
 min-height: 18px;
 text-align: right;
}
.wmt-msg-success { color: var(--wmt-success); }
.wmt-msg-error { color: var(--wmt-error); }

/* 
 ADMIN — Painel de gestão
 */

.wmt-wrap h1 {
 display: flex;
 align-items: center;
 gap: 10px;
}

.wmt-version {
 font-size: .75rem;
 background: #f0f0f1;
 border: 1px solid var(--wmt-border);
 border-radius: 20px;
 padding: 2px 8px;
 color: #50575e;
 font-weight: 400;
}

/* Cards do dashboard */
.wmt-cards {
 display: grid;
 grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
 gap: 16px;
 margin: 20px 0;
}

.wmt-card {
 background: #fff;
 border: 1px solid var(--wmt-border);
 border-radius: 8px;
 padding: 20px;
 text-align: center;
}

.wmt-flag {
 display: inline-block;
 font-size: 1.25rem;
 font-weight: 700;
 background: var(--wmt-primary);
 color: #fff;
 border-radius: 4px;
 padding: 4px 10px;
 letter-spacing: .05em;
 margin-bottom: 8px;
}

.wmt-card h3 { margin: 6px 0 4px; font-size: 1rem; }
.wmt-count { color: #50575e; font-size: .875rem; margin: 0 0 12px; }

.wmt-card-actions {
 display: flex;
 gap: 6px;
 justify-content: center;
 flex-wrap: wrap;
}

/* Info box */
.wmt-info-box {
 background: #f0f6fc;
 border-left: 4px solid var(--wmt-primary);
 border-radius: 0 var(--wmt-radius) var(--wmt-radius) 0;
 padding: 16px 20px;
 max-width: 640px;
 margin-top: 10px;
}
.wmt-info-box h3 { margin: 0 0 10px; }
.wmt-info-box ol { margin: 0 0 10px; padding-left: 20px; }

/* Tabs de idioma */
.wmt-lang-tabs {
 display: flex;
 gap: 0;
 margin: 16px 0 0;
 border-bottom: 1px solid var(--wmt-border);
}

/* Pesquisa */
.wmt-search-form {
 display: flex;
 gap: 8px;
 margin: 16px 0;
}
.wmt-search-form input[type=search] {
 padding: 6px 10px;
 border: 1px solid var(--wmt-border);
 border-radius: var(--wmt-radius);
 width: 280px;
}

/* Adicionar novo */
.wmt-add-form {
 background: #f6f7f7;
 border: 1px solid var(--wmt-border);
 border-radius: var(--wmt-radius);
 padding: 14px 18px;
 margin-bottom: 16px;
}
.wmt-add-form h3 { margin: 0 0 12px; font-size: .9375rem; }

.wmt-row {
 display: grid;
 grid-template-columns: 1fr 1fr auto;
 gap: 10px;
 align-items: start;
}
.wmt-row textarea {
 width: 100%;
 box-sizing: border-box;
 border: 1px solid var(--wmt-border);
 border-radius: var(--wmt-radius);
 padding: 6px 8px;
 font-size: .875rem;
 resize: vertical;
}

/* Tabela */
.wmt-table { margin-top: 0 !important; }
.wmt-table .wmt-edit-field {
 width: 100%;
 box-sizing: border-box;
 border: 1px solid var(--wmt-border);
 border-radius: var(--wmt-radius);
 padding: 4px 6px;
 font-size: .875rem;
 resize: vertical;
}
.wmt-actions { white-space: nowrap; }
.wmt-actions .button { margin-right: 4px; }

/* Importar/Exportar */
.wmt-two-col {
 display: grid;
 grid-template-columns: 1fr 1fr;
 gap: 20px;
 max-width: 800px;
 margin-top: 16px;
}
.wmt-box {
 background: #fff;
 border: 1px solid var(--wmt-border);
 border-radius: var(--wmt-radius);
 padding: 20px;
}
.wmt-box h3 { margin: 0 0 8px; }
.wmt-box select,
.wmt-box input[type=file] {
 display: block;
 margin: 10px 0;
}

@media (max-width: 640px) {
 .wmt-two-col { grid-template-columns: 1fr; }
 .wmt-row { grid-template-columns: 1fr; }
}

/* Idiomas — form de adicionar */
.wmt-lang-form-row {
 display: flex;
 gap: 10px;
 align-items: center;
 flex-wrap: wrap;
}
.wmt-lang-form-row input[type=text],
.wmt-lang-form-row input[type=number] {
 padding: 6px 8px;
 border: 1px solid var(--wmt-border);
 border-radius: var(--wmt-radius);
 font-size: .875rem;
}

/* Card inactivo */
.wmt-card--inactive {
 opacity: .55;
 border-style: dashed;
}
.wmt-inactive-label {
 font-size: .75rem;
 color: var(--wmt-error);
 margin: 0 0 8px;
}

/* Tab code badge */
.wmt-tab-code {
 display: inline-block;
 font-size: .65rem;
 background: #ddd;
 border-radius: 3px;
 padding: 1px 4px;
 margin-left: 4px;
 vertical-align: middle;
}

/* 
 PÁGINA DE IA
 */

.wmt-badge-claude {
 display: inline-block;
 background: linear-gradient(135deg, #c47bff, #7c3aed);
 color: #fff;
 font-size: .7rem;
 font-weight: 700;
 padding: 3px 10px;
 border-radius: 20px;
 letter-spacing: .05em;
 vertical-align: middle;
}

/* API Key box */
.wmt-ai-apikey-box {
 background: #fff;
 border: 1px solid var(--wmt-border);
 border-radius: var(--wmt-radius);
 padding: 14px 18px;
 margin: 16px 0 20px;
 max-width: 900px;
}
.wmt-apikey--ok { border-color: var(--wmt-success); background: #f0fff4; }
.wmt-apikey--missing { border-color: var(--wmt-error); background: #fff5f5; }

.wmt-apikey-row {
 display: flex;
 align-items: center;
 gap: 10px;
 flex-wrap: wrap;
}
.wmt-apikey-label { font-weight: 600; min-width: 200px; }
.wmt-apikey-row input[type=password] {
 padding: 6px 10px;
 border: 1px solid var(--wmt-border);
 border-radius: var(--wmt-radius);
 font-size: .875rem;
 font-family: monospace;
}
.wmt-apikey-link {
 color: var(--wmt-primary);
 font-size: .8125rem;
 text-decoration: none;
 margin-left: auto;
}
.wmt-apikey-link:hover { text-decoration: underline; }

/* Controlos */
.wmt-ai-controls {
 display: flex;
 align-items: flex-end;
 gap: 20px;
 background: #f6f7f7;
 border: 1px solid var(--wmt-border);
 border-radius: var(--wmt-radius);
 padding: 16px 20px;
 margin-bottom: 20px;
 max-width: 900px;
 flex-wrap: wrap;
}
.wmt-ai-control-group { display: flex; flex-direction: column; gap: 5px; }
.wmt-ai-control-group label { font-size: .8125rem; font-weight: 600; color: #3c434a; }
.wmt-ai-control-group select {
 padding: 6px 10px;
 border: 1px solid var(--wmt-border);
 border-radius: var(--wmt-radius);
 font-size: .875rem;
}
.wmt-lang-pill {
 display: inline-flex;
 align-items: center;
 padding: 6px 14px;
 background: var(--wmt-primary);
 color: #fff;
 border-radius: 20px;
 font-size: .875rem;
 font-weight: 600;
}
.wmt-ai-arrow { font-size: 1.5rem; color: #c3c4c7; align-self: flex-end; padding-bottom: 4px; }

/* Workspace */
.wmt-ai-workspace { max-width: 100%; }

.wmt-ai-toolbar {
 display: flex;
 align-items: center;
 gap: 10px;
 margin-bottom: 14px;
 flex-wrap: wrap;
}

.wmt-btn-claude {
 background: linear-gradient(135deg, #7c3aed, #c47bff) !important;
 border-color: #7c3aed !important;
 color: #fff !important;
}
.wmt-btn-claude:hover { opacity: .9; }
.wmt-btn-claude:disabled { opacity: .5; cursor: not-allowed; }

.wmt-btn-save-all {
 background: var(--wmt-success) !important;
 border-color: #007a1f !important;
 color: #fff !important;
}
.wmt-btn-save-all:disabled { opacity: .5; cursor: not-allowed; }

.wmt-ai-progress {
 font-size: .875rem;
 font-style: italic;
 margin-left: 6px;
}
.wmt-prog-success { color: var(--wmt-success); font-style: normal; font-weight: 600; }
.wmt-prog-error { color: var(--wmt-error); font-style: normal; }
.wmt-prog-info { color: var(--wmt-primary); }

/* Tabela IA */
.wmt-ai-table textarea.wmt-ai-translation {
 width: 100%;
 box-sizing: border-box;
 border: 1px solid var(--wmt-border);
 border-radius: var(--wmt-radius);
 padding: 5px 8px;
 font-size: .875rem;
 resize: vertical;
}

/* Status badges */
.wmt-status-ai { color: #7c3aed; font-weight: 600; }
.wmt-status-saved { color: var(--wmt-success); font-weight: 600; }
.wmt-status-existing { color: #50575e; }
.wmt-status-missing { color: var(--wmt-error); }

.wmt-ai-empty {
 text-align: center;
 padding: 40px;
 color: var(--wmt-success);
 font-size: 1rem;
 font-weight: 600;
 background: #f0fff4;
 border: 1px solid #c6efce;
 border-radius: var(--wmt-radius);
}

/* 
 PÁGINA: TRADUÇÃO COM IA
 */

/* Badge Google */
.wmt-badge-google {
 display: inline-block;
 font-size: .7rem;
 font-weight: 700;
 background: linear-gradient(135deg, #4285f4, #34a853, #fbbc05, #ea4335);
 color: #fff;
 border-radius: 20px;
 padding: 3px 10px;
 vertical-align: middle;
 letter-spacing: .03em;
}

/* Caixa da API Key */
.wmt-ai-apikey-box {
 border-radius: var(--wmt-radius);
 padding: 14px 18px;
 margin: 16px 0;
 border: 2px solid;
}
.wmt-apikey--ok { border-color: var(--wmt-success); background: #f0fdf4; }
.wmt-apikey--missing { border-color: var(--wmt-error); background: #fef2f2; }

.wmt-apikey-row {
 display: flex;
 align-items: center;
 gap: 10px;
 flex-wrap: wrap;
 margin-bottom: 6px;
}
.wmt-apikey-label { font-weight: 600; min-width: 220px; }
.wmt-apikey-link { font-size: .875rem; color: var(--wmt-primary); }

/* Controlos de idioma */
.wmt-ai-controls {
 display: flex;
 align-items: flex-end;
 gap: 16px;
 padding: 16px 20px;
 background: #f6f7f7;
 border: 1px solid var(--wmt-border);
 border-radius: var(--wmt-radius);
 margin-bottom: 16px;
 flex-wrap: wrap;
}
.wmt-ai-control-group { display: flex; flex-direction: column; gap: 4px; }
.wmt-ai-control-group label { font-size: .8125rem; font-weight: 600; color: #3c434a; }
.wmt-ai-control-group select {
 padding: 6px 10px;
 border: 1px solid var(--wmt-border);
 border-radius: var(--wmt-radius);
 font-size: .875rem;
 min-width: 200px;
}
.wmt-ai-arrow { font-size: 1.5rem; color: #8c8f94; padding-bottom: 4px; }
.wmt-lang-pill {
 display: inline-block;
 padding: 6px 12px;
 background: #fff;
 border: 1px solid var(--wmt-border);
 border-radius: var(--wmt-radius);
 font-size: .875rem;
 font-weight: 600;
}

/* Workspace */
.wmt-ai-workspace {
 border: 1px solid var(--wmt-border);
 border-radius: var(--wmt-radius);
 overflow: hidden;
}
.wmt-ai-toolbar {
 display: flex;
 align-items: center;
 gap: 8px;
 padding: 12px 16px;
 background: #f6f7f7;
 border-bottom: 1px solid var(--wmt-border);
 flex-wrap: wrap;
}

/* Botão Google */
.wmt-btn-google {
 background: #4285f4 !important;
 border-color: #3367d6 !important;
 color: #fff !important;
}
.wmt-btn-google:hover { background: #3367d6 !important; }
.wmt-btn-google:disabled { opacity: .5; cursor: not-allowed; }

.wmt-btn-save-all {
 background: var(--wmt-success) !important;
 border-color: #007b20 !important;
 color: #fff !important;
}
.wmt-btn-save-all:hover { background: #007b20 !important; }
.wmt-btn-save-all:disabled { opacity: .5; cursor: not-allowed; }

/* Barra de progresso */
.wmt-ai-progress {
 font-size: .875rem;
 padding: 4px 10px;
 border-radius: var(--wmt-radius);
}
.wmt-progress-info { background: #e8f4fd; color: #2271b1; }
.wmt-progress-success { background: #edfaef; color: var(--wmt-success); }
.wmt-progress-error { background: #fef2f2; color: var(--wmt-error); }

/* Tabela de traduções IA */
.wmt-ai-table .wmt-ai-translation {
 width: 100%;
 box-sizing: border-box;
 border: 1px solid var(--wmt-border);
 border-radius: 4px;
 padding: 4px 6px;
 font-size: .8125rem;
 resize: vertical;
 min-height: 32px;
}
.wmt-ai-table .wmt-ai-translation:focus {
 border-color: var(--wmt-primary);
 outline: none;
}

/* Estado badges */
.wmt-status-google { background: #e8f0fe; color: #4285f4; padding: 2px 7px; border-radius: 20px; font-size: .75rem; font-weight: 600; }
.wmt-status-saved { background: #edfaef; color: var(--wmt-success); padding: 2px 7px; border-radius: 20px; font-size: .75rem; font-weight: 600; }
.wmt-status-missing { background: #f0f0f1; color: #8c8f94; padding: 2px 7px; border-radius: 20px; font-size: .75rem; }

.wmt-ai-empty {
 text-align: center;
 padding: 40px;
 font-size: 1rem;
 color: var(--wmt-success);
}

@media (max-width: 782px) {
 .wmt-ai-controls { flex-direction: column; align-items: flex-start; }
 .wmt-ai-arrow { transform: rotate(90deg); }
}

/* Auto-detect pill */
.wmt-lang-pill--auto {
    background: #e8f0fe;
    border-color: #4285f4;
    color: #1a73e8;
    font-weight: 600;
    position: relative;
}
.wmt-auto-hint {
    display: block;
    font-size: .72rem;
    font-weight: 400;
    color: #5f6368;
    margin-top: 2px;
    white-space: nowrap;
}

/* ════════════════════════════════════════════════════════════════════
   PAGINA: EXPORTAR / IMPORTAR STRINGS
   ════════════════════════════════════════════════════════════════════ */

.wmt-step-box {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--wmt-border);
    border-radius: var(--wmt-radius);
    padding: 20px 24px;
    margin-bottom: 16px;
}

.wmt-step-num {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: var(--wmt-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
}

.wmt-step-content { flex: 1; }
.wmt-step-content h3 { margin: 0 0 6px; font-size: .9375rem; }
.wmt-step-content p  { margin: 0 0 10px; color: #50575e; font-size: .875rem; }

.wmt-step-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.wmt-step-status--ok {
    color: var(--wmt-success);
    font-size: .875rem;
    margin-top: 8px !important;
}

.wmt-export-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.wmt-export-row select {
    padding: 6px 10px;
    border: 1px solid var(--wmt-border);
    border-radius: var(--wmt-radius);
    font-size: .875rem;
}

/* Prompts de IA */
.wmt-prompt-examples {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 8px;
}
.wmt-prompt-card {
    background: #f6f7f7;
    border: 1px solid var(--wmt-border);
    border-radius: var(--wmt-radius);
    padding: 12px 14px;
    font-size: .8125rem;
}
.wmt-prompt-card strong { display: block; margin-bottom: 6px; color: #1d2327; }
.wmt-prompt-card code {
    display: block;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 8px;
    font-size: .75rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    user-select: all;
    cursor: text;
}

/* Zona de importacao */
.wmt-import-area {
    border: 2px dashed var(--wmt-border);
    border-radius: var(--wmt-radius);
    padding: 24px;
    text-align: center;
    transition: border-color .15s, background .15s;
}
.wmt-import-area.wmt-drop-active {
    border-color: var(--wmt-primary);
    background: #f0f6fc;
}
.wmt-import-area p { margin: 0 0 8px; color: #50575e; font-size: .875rem; }

.wmt-filename {
    font-size: .875rem;
    color: var(--wmt-primary);
    font-weight: 600;
    margin-top: 6px !important;
}

.wmt-import-options {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.wmt-import-options select {
    padding: 6px 10px;
    border: 1px solid var(--wmt-border);
    border-radius: var(--wmt-radius);
    font-size: .875rem;
}

@media (max-width: 782px) {
    .wmt-prompt-examples { grid-template-columns: 1fr; }
    .wmt-step-box { flex-direction: column; }
}

/* Engine tabs */
.wmt-engine-tabs {
    display: flex;
    gap: 4px;
    margin: 16px 0 0;
    border-bottom: 2px solid var(--wmt-border);
    padding-bottom: 0;
}
.wmt-engine-tab {
    padding: 8px 20px;
    border: 1px solid var(--wmt-border);
    border-bottom: none;
    border-radius: var(--wmt-radius) var(--wmt-radius) 0 0;
    background: #f6f7f7;
    cursor: pointer;
    font-size: .875rem;
    font-weight: 500;
    color: #50575e;
    transition: background .15s, color .15s;
    margin-bottom: -2px;
}
.wmt-engine-tab:hover { background: #e9e9e9; color: #1d2327; }
.wmt-engine-tab--active {
    background: #fff;
    color: var(--wmt-primary);
    border-bottom: 2px solid #fff;
    font-weight: 600;
}

/* Botao OpenAI */
.wmt-btn-openai {
    background: #10a37f !important;
    border-color: #0d8c6d !important;
    color: #fff !important;
}
.wmt-btn-openai:hover   { background: #0d8c6d !important; }
.wmt-btn-openai:disabled { opacity: .5; cursor: not-allowed; }

/* Status badges */
.wmt-status-openai { background: #e6f9f5; color: #10a37f; padding: 2px 7px; border-radius: 20px; font-size: .75rem; font-weight: 600; }

/* ════════════════════════════════════════════════════════════════════
   PAGINA: CRAWL COMPLETO
   ════════════════════════════════════════════════════════════════════ */

.wmt-crawl-info-box {
    display: flex;
    gap: 20px;
    margin: 16px 0 20px;
}

.wmt-crawl-stat {
    background: #fff;
    border: 1px solid var(--wmt-border);
    border-radius: var(--wmt-radius);
    padding: 16px 24px;
    text-align: center;
    min-width: 140px;
}

.wmt-crawl-stat-num {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--wmt-primary);
    line-height: 1.1;
}

.wmt-crawl-stat-label {
    display: block;
    font-size: .8125rem;
    color: #50575e;
    margin-top: 4px;
}

.wmt-crawl-options {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.wmt-crawl-options label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .875rem;
    cursor: pointer;
}

/* Barra de progresso */
.wmt-progress-bar-wrap {
    margin-top: 12px;
    height: 8px;
    background: #f0f0f1;
    border-radius: 4px;
    overflow: hidden;
}

.wmt-progress-bar {
    height: 100%;
    background: var(--wmt-primary);
    border-radius: 4px;
    transition: width .3s ease;
    width: 0%;
}

/* Botao de perigo */
.wmt-btn-danger {
    background: var(--wmt-error) !important;
    border-color: #b32d2e !important;
    color: #fff !important;
}
.wmt-btn-danger:hover { background: #b32d2e !important; }

/* Botao Parar traducao */
.wmt-btn-stop {
    background: #f0f0f1 !important;
    border-color: #8c8f94 !important;
    color: #d63638 !important;
    font-weight: 600 !important;
}
.wmt-btn-stop:hover {
    background: #fef2f2 !important;
    border-color: #d63638 !important;
}

/* ── Bandeiras ─────────────────────────────────────────────────── */
.wmt-flag-wrap {
    margin-bottom: 8px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wmt-flag-img {
    height: 40px;
    width: 60px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
    display: block;
}

/* Bandeira pequena na tabela de idiomas */
.wmt-flag-table {
    height: 24px;
    width: 36px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    vertical-align: middle;
}

/* Bandeira no seletor de idioma (estilo lista) */
.wmt-switcher--list .wmt-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.wmt-switcher-flag {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,.2);
    flex-shrink: 0;
    vertical-align: middle;
}

/* ════════════════════════════════════════════════════════════════════
   PAGINA: DEFINICOES DO SELETOR
   ════════════════════════════════════════════════════════════════════ */

.wmt-switcher-settings-wrap {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
    margin-top: 16px;
}

.wmt-settings-col { min-width: 0; }

.wmt-settings-section {
    background: #fff;
    border: 1px solid var(--wmt-border);
    border-radius: var(--wmt-radius);
    padding: 18px 22px;
    margin-bottom: 16px;
}
.wmt-settings-section h3 {
    margin: 0 0 14px;
    font-size: .9375rem;
    border-bottom: 1px solid #f0f0f1;
    padding-bottom: 8px;
}

.wmt-settings-table th {
    width: 220px;
    font-weight: 500;
    padding: 8px 10px 8px 0;
    vertical-align: middle;
}
.wmt-settings-table td { padding: 6px 0; vertical-align: middle; }

/* Range slider */
.wmt-range-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.wmt-range-row input[type=range] {
    width: 180px;
    accent-color: var(--wmt-primary);
}
.wmt-range-row span {
    min-width: 38px;
    font-size: .875rem;
    color: #50575e;
    font-variant-numeric: tabular-nums;
}

/* Color picker */
input[type=color] {
    width: 38px;
    height: 32px;
    padding: 2px;
    border: 1px solid var(--wmt-border);
    border-radius: 4px;
    cursor: pointer;
    vertical-align: middle;
}
.wmt-color-hex {
    font-size: .8125rem;
    color: #50575e;
    margin-left: 6px;
    font-family: monospace;
    vertical-align: middle;
}

/* Toggle switch */
.wmt-toggle {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    vertical-align: middle;
}
.wmt-toggle input { opacity: 0; width: 0; height: 0; }
.wmt-toggle-slider {
    position: absolute;
    inset: 0;
    background: #c3c4c7;
    border-radius: 24px;
    cursor: pointer;
    transition: background .2s;
}
.wmt-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    left: 3px; top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.wmt-toggle input:checked + .wmt-toggle-slider { background: var(--wmt-primary); }
.wmt-toggle input:checked + .wmt-toggle-slider::before { transform: translateX(18px); }

/* Botoes */
.wmt-settings-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

/* Shortcode info */
.wmt-shortcode-info { background: #f0f6fc !important; border-color: var(--wmt-primary) !important; }
.wmt-shortcode-preview {
    display: inline-block;
    background: #fff;
    border: 1px solid var(--wmt-border);
    border-radius: 4px;
    padding: 6px 12px;
    font-size: .9375rem;
    user-select: all;
    cursor: text;
    margin: 6px 0;
}

/* Coluna de preview */
.wmt-preview-sticky { position: sticky; top: 60px; }
.wmt-preview-col h3 { margin: 0 0 12px; font-size: .9375rem; }
.wmt-preview-box {
    background: #f6f7f7;
    border: 1px solid var(--wmt-border);
    border-radius: var(--wmt-radius);
    padding: 24px;
    min-height: 120px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: visible;
    padding-bottom: 80px;
}

/* Preview flag */
.wmt-preview-flag {
    height: 20px;
    width: 30px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,.2);
    flex-shrink: 0;
}

/* Botão trigger do preview dropdown */
#wmt-preview-trigger {
    border: 1px solid #dddddd;
    user-select: none;
}

/* Lista aberta no preview */
#wmt-preview-list {
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 6px;
}

/* Items da lista no preview */
#wmt-preview-list .wmt-lang-btn {
    border: none;
    border-bottom: 1px solid rgba(0,0,0,.06);
    border-radius: 0;
    margin: 0;
}
#wmt-preview-list .wmt-lang-btn:last-child {
    border-bottom: none;
}

@media (max-width: 960px) {
    .wmt-switcher-settings-wrap { grid-template-columns: 1fr; }
    .wmt-preview-sticky { position: static; }
}