/* rm-diagnostico.css - versão escura, paleta preto + lilac (#7868E6)
   Inspirado no trecho de estilo fornecido pelo usuário (mpci-feedback)
*/

:root{
  --lilac: #7868E6;
  --bg: #0F0F10;       /* container background */
  --card-bg: #111216;  /* card background */
  --panel: #1C1C1F;    /* subtle panel background / slider track */
  --muted: #9CA3AF;    /* subdued text */
  --text: #F5F5F5;     /* primary text */
  --accent-weak: rgba(120,104,230,0.12);
  --border: #27272F;
}

/* outer wrapper centers the plugin on desktop screens */
.rm-diagnostico-outer {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: 24px;
    box-sizing: border-box;
    background: var(--bg);
}

/* main card */
.rm-diagnostico {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    padding: 20px 22px;
    border-radius: 12px;
    background: var(--card-bg);
    max-width: 900px;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(255,255,255,0.03);
}

/* Title */
.rm-title {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: .01em;
    color: var(--text);
    text-align: center;
}

/* Subtitle / small */
.rm-small {
    font-size: 13px;
    color: #D1D1D6;
    margin-top: 8px;
}

/* grid layout */
.rm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 10px;
}

@media (max-width: 900px) {
  .rm-grid { grid-template-columns: 1fr; }
}

/* card pieces */
.rm-card {
    border-radius: 12px;
    padding: 14px;
    background: linear-gradient(180deg,var(--card-bg), #0f1113);
    border: 1px solid var(--border);
    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}

.rm-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text);
    font-weight: 600;
}

/* file input & preview */
#rm-image-input { display:block; margin-bottom:10px; }
.rm-preview {
    width:100%;
    height:180px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:8px;
    background: #0B0B0C;
    border: 1px dashed rgba(255,255,255,0.04);
    color: var(--muted);
    overflow:hidden;
}
.rm-preview img { max-width:100%; max-height:100%; display:block; }

/* textarea styling */
#rm-proposal {
    width:100%;
    border-radius:8px;
    border:1px solid var(--border);
    background:#0B0B0C;
    color:var(--text);
    font-size:13px;
    padding:8px 10px;
    min-height:88px;
    resize:vertical;
    box-sizing:border-box;
}
#rm-proposal::placeholder { color:#6B7280; }

/* sliders / weights UI */
.rm-weights { margin-top:12px; border-top:1px dashed rgba(255,255,255,0.03); padding-top:12px; }
.rm-weight-row { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.rm-weight-row label { min-width:150px; font-weight:600; color:var(--text); font-size:13px; }
.rm-weight-val { font-size:12px; color:var(--muted); min-width:40px; text-align:right; }

/* slider track */
.rm-weight-row input[type="range"],
.mpci-fb-slider input[type="range"]{
  -webkit-appearance:none;
  appearance:none;
  height:4px;
  width:100%;
  background: var(--panel);
  border-radius:999px;
  outline:none;
}

/* thumb */
.rm-weight-row input[type="range"]::-webkit-slider-thumb,
.mpci-fb-slider input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance:none;
  appearance:none;
  width:14px;
  height:14px;
  border-radius:50%;
  background:var(--lilac);
  box-shadow: 0 4px 10px rgba(120,104,230,0.18);
  cursor:pointer;
  margin-top:-5px;
}
.rm-weight-row input[type="range"]::-moz-range-thumb{
  width:14px;
  height:14px;
  border-radius:50%;
  background:var(--lilac);
  cursor:pointer;
}

/* bar visual (thin) */
.rm-bar {
  width:100%;
  height:3px;
  border-radius:999px;
  background:#131316;
  overflow:hidden;
  margin-top:6px;
}
.rm-bar-fill {
  height:100%;
  width:0%;
  border-radius:999px;
  background: linear-gradient(90deg, var(--lilac), rgba(120,104,230,0.55));
  transition: width .25s ease-out;
}

/* button */
.rm-button {
  border:none;
  border-radius:999px;
  padding:10px 18px;
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  background: var(--lilac);
  color: #0B0B0C;
  display:inline-block;
  width:100%;
}
.rm-button[disabled]{ opacity:.6; cursor:default; }

/* status */
.rm-status { font-size:12px; margin-top:8px; color:#A5B4FC; }

/* results block */
.rm-results {
  margin-top:18px;
  padding:14px;
  border-radius:12px;
  background: #0B0B0C;
  border:1px solid rgba(255,255,255,0.03);
}

/* badges */
.rm-badges { display:flex; gap:10px; align-items:center; margin-bottom:12px; flex-wrap:wrap; }
.rm-badge {
  padding:6px 10px;
  border-radius:999px;
  font-weight:700;
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.04);
}
.rm-badge-good { background: var(--lilac); color:#0B0B0C; border:none; }
.rm-badge-warn { background: rgba(255,215,120,0.08); color:var(--text); border:1px solid rgba(255,255,255,0.03); }
.rm-badge-bad { background: rgba(255,120,120,0.06); color:var(--text); border:1px solid rgba(255,255,255,0.03); }
.rm-badge-neutral { background: transparent; color: var(--text); }

/* text areas / pre blocks */
.rm-texts { display:flex; gap:12px; flex-wrap:wrap; margin-top:12px; }
.rm-text-col { flex:1 1 300px; min-width:240px; }
.rm-pre {
  background: transparent;
  padding:10px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,0.03);
  max-height:260px;
  overflow:auto;
  white-space:pre-wrap;
  word-wrap:break-word;
  color: var(--text);
  font-size:13px;
}

/* highlight for matched tokens */
.rm-highlight {
  background: var(--lilac);
  color: #0B0B0C;
  padding: 2px 4px;
  border-radius: 4px;
  font-weight:700;
}

/* suggestions / metrics list */
.rm-suggestions ul, .rm-metrics ul { margin:0; padding-left:18px; color:var(--muted); }

/* footer */
.rm-footer { margin-top:12px; font-size:12px; color:var(--muted); text-align:center; }

/* small responsive tweak for mobile footer order */
@media (max-width:600px){
  .rm-footer { text-align:left; }
}

/* Accessibility: focus styles */
:focus { outline: 3px solid rgba(120,104,230,0.15); outline-offset: 2px; }

/* ensure selects and inputs follow theme */
select, input[type="file"], input[type="checkbox"] {
  color: var(--text);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.03);
  padding:6px 8px;
  border-radius:6px;
}

/* ensure links (if any) are lilac */
a { color: var(--lilac); text-decoration: none; }
a:hover { text-decoration: underline; }
