/* MODYNOA | Passe de acessibilidade e contraste v4
   Escopo: somente cores, estados visuais e legibilidade. Nenhum dado, checkout,
   crédito, geração, login ou interação de negócio foi alterado.
   Regra: fundo escuro => texto creme; fundo claro => texto marrom escuro. */

/* ---- PALETA EM SUPERFÍCIES CLARAS (modo claro) ---- */
html:not(.md-dark) body .app-page .wardrobe-builder .wardrobe-lead,
html:not(.md-dark) body .app-page .wardrobe-builder .wardrobe-hint,
html:not(.md-dark) body .app-page .wardrobe-builder .wardrobe-mini-hint{
 background:#FFF7F0!important; border-color:#D7BEB3!important;
 color:#483630!important; -webkit-text-fill-color:#483630!important;
}
html:not(.md-dark) body .app-page .wardrobe-builder .wardrobe-lead strong,
html:not(.md-dark) body .app-page .wardrobe-builder .wardrobe-hint strong,
html:not(.md-dark) body .app-page .wardrobe-builder .wardrobe-mini-hint strong{
 color:#6F1634!important;-webkit-text-fill-color:#6F1634!important;opacity:1!important;
}
html:not(.md-dark) body .app-page .wardrobe-builder .wardrobe-lead p,
html:not(.md-dark) body .app-page .wardrobe-builder .wardrobe-mini-hint p{
 color:#654C42!important;-webkit-text-fill-color:#654C42!important;opacity:1!important;
}
html:not(.md-dark) body .app-page .wardrobe-builder .wardrobe-count{
 color:#811936!important;-webkit-text-fill-color:#811936!important;opacity:1!important;
 background:#F4E4DF!important;border-color:#D9B9AE!important;
}
html:not(.md-dark) body .app-page .wardrobe-builder .wardrobe-group,
html:not(.md-dark) body .app-page .wardrobe-builder .wardrobe-slot{
 background:#FFF8F3!important;border-color:#DFC9BE!important;
}
html:not(.md-dark) body .app-page .wardrobe-builder .wardrobe-group>summary :is(strong,small),
html:not(.md-dark) body .app-page .wardrobe-builder .wardrobe-slot :is(strong,small,label),
html:not(.md-dark) body .app-page .wardrobe-builder .wardrobe-slot-top strong{
 color:#49352E!important;-webkit-text-fill-color:#49352E!important;opacity:1!important;
}

/* ---- GALERIA: elimina cartão branco com metadados quase brancos ---- */
html:not(.md-dark) body .app-page .gallery .look,
html:not(.md-dark) body .app-page .gallery .look-info{
 background:#FFF9F5!important;border-color:#E0C9BD!important;color:#392A26!important;
}
html:not(.md-dark) body .app-page .gallery .look-info>strong{
 color:#332421!important;-webkit-text-fill-color:#332421!important;opacity:1!important;
}
html:not(.md-dark) body .app-page .gallery .look-info p,
html:not(.md-dark) body .app-page .gallery .look-info p.small-text.muted,
html:not(.md-dark) body .app-page .gallery .look-info details,
html:not(.md-dark) body .app-page .gallery .look-info details>summary{
 color:#60483F!important;-webkit-text-fill-color:#60483F!important;opacity:1!important;
}
html:not(.md-dark) body .app-page .gallery .look-info .status{
 background:#F0DEDA!important;border:1px solid #D5B5B3!important;
 color:#76203A!important;-webkit-text-fill-color:#76203A!important;opacity:1!important;
}

/* ---- MODO ESCURO: usar o mesmo cartão vinho-marrom aprovado ---- */
html.md-dark body .app-page .wardrobe-builder .wardrobe-lead,
html.md-dark body .app-page .wardrobe-builder .wardrobe-hint,
html.md-dark body .app-page .wardrobe-builder .wardrobe-mini-hint{
 background:#392B30!important;border:1px solid #765661!important;
 color:#F7EAE4!important;-webkit-text-fill-color:#F7EAE4!important;
 box-shadow:none!important;opacity:1!important;
}
html.md-dark body .app-page .wardrobe-builder .wardrobe-lead strong,
html.md-dark body .app-page .wardrobe-builder .wardrobe-hint strong,
html.md-dark body .app-page .wardrobe-builder .wardrobe-mini-hint strong{
 color:#FFF3EB!important;-webkit-text-fill-color:#FFF3EB!important;opacity:1!important;
}
html.md-dark body .app-page .wardrobe-builder .wardrobe-lead p,
html.md-dark body .app-page .wardrobe-builder .wardrobe-mini-hint p{
 color:#E4D1C8!important;-webkit-text-fill-color:#E4D1C8!important;opacity:1!important;
}
html.md-dark body .app-page .wardrobe-builder .wardrobe-count{
 background:#4B343D!important;border-color:#916B76!important;
 color:#FFEEE6!important;-webkit-text-fill-color:#FFEEE6!important;opacity:1!important;
}
html.md-dark body .app-page .wardrobe-builder .wardrobe-group,
html.md-dark body .app-page .wardrobe-builder .wardrobe-slot{
 background:#302529!important;border-color:#765661!important;
 color:#F7EAE4!important;
}
html.md-dark body .app-page .wardrobe-builder .wardrobe-group>summary strong,
html.md-dark body .app-page .wardrobe-builder .wardrobe-slot-top strong,
html.md-dark body .app-page .wardrobe-builder .wardrobe-slot .field label{
 color:#FFF3EB!important;-webkit-text-fill-color:#FFF3EB!important;opacity:1!important;
}
html.md-dark body .app-page .wardrobe-builder .wardrobe-group>summary small,
html.md-dark body .app-page .wardrobe-builder .wardrobe-slot :is(small,p,.photo-label){
 color:#E5CEC8!important;-webkit-text-fill-color:#E5CEC8!important;opacity:1!important;
}
html.md-dark body .app-page .wardrobe-builder .wardrobe-group-icon{
 background:#63434D!important;border-color:#A07982!important;
 color:#FFEEE6!important;-webkit-text-fill-color:#FFEEE6!important;
}
html.md-dark body .app-page .wardrobe-builder .wardrobe-chevron{
 color:#FFF1E9!important;-webkit-text-fill-color:#FFF1E9!important;
}
/* Grupo aberto: dica escura permanece legível mesmo com a ênfase interna. */
html.md-dark body .app-page .wardrobe-builder .wardrobe-hint *{
 color:#FFF1E9!important;-webkit-text-fill-color:#FFF1E9!important;opacity:1!important;
}
/* Campos da montagem seguem creme/claro quando claros e texto escuro sempre. */
html.md-dark body .app-page .wardrobe-builder .wardrobe-slot select,
html.md-dark body .app-page .wardrobe-builder .wardrobe-slot input.input{
 background:#FBF3EE!important;border-color:#CFAFA4!important;
 color:#40302B!important;-webkit-text-fill-color:#40302B!important;
}
html.md-dark body .app-page .wardrobe-builder .wardrobe-slot select option{
 background:#FBF3EE!important;color:#40302B!important;
}

/* Cartões de resultado: texto + chip + detalhes no tema noturno */
html.md-dark body .app-page .gallery .look,
html.md-dark body .app-page .gallery .look-info{
 background:#302529!important;border-color:#765661!important;
 color:#F8EFEA!important;box-shadow:none!important;
}
html.md-dark body .app-page .gallery .look-info>strong{
 color:#FFF6F0!important;-webkit-text-fill-color:#FFF6F0!important;opacity:1!important;
}
html.md-dark body .app-page .gallery .look-info p,
html.md-dark body .app-page .gallery .look-info p.small-text.muted,
html.md-dark body .app-page .gallery .look-info details,
html.md-dark body .app-page .gallery .look-info details>summary{
 color:#E5D1C9!important;-webkit-text-fill-color:#E5D1C9!important;opacity:1!important;
}
html.md-dark body .app-page .gallery .look-info .status{
 background:#5A3541!important;border:1px solid #986B79!important;
 color:#FFE8DE!important;-webkit-text-fill-color:#FFE8DE!important;opacity:1!important;
}
html.md-dark body .app-page .gallery .look-info details .panel{
 background:#392B30!important;border-color:#765661!important;
}
html.md-dark body .app-page .gallery .look-info details .panel :is(p,strong,h2,small){
 color:#F8EFEA!important;-webkit-text-fill-color:#F8EFEA!important;
}

/* Também impedir herança clara sobre creme em cartões de resultados de qualquer tema. */
html:not(.md-dark) body .app-page .gallery .look-info details .panel :is(h2,strong){
 color:#392A26!important;-webkit-text-fill-color:#392A26!important;
}

/* Atualizar créditos, botão de limpar perfumes e outros botões secundários
   de cor clara: sempre texto vinho escuro, independentemente do tema. */
html.md-dark body .app-page .premium-rail :is([data-refresh-credits],.btn-credit-refresh),
html.md-dark body .app-page .premium-rail .btn-outline[data-refresh-credits],
html.md-dark body .app-page :is([data-refresh-credits],.btn-credit-refresh){
 background:#F3E7DE!important;border:1px solid #D7BCB0!important;
 color:#64253B!important;-webkit-text-fill-color:#64253B!important;opacity:1!important;
}
html.md-dark body .app-page :is([data-refresh-credits],.btn-credit-refresh) :is(span,strong){
 color:#64253B!important;-webkit-text-fill-color:#64253B!important;
}
/* O aviso do guia da foto deve continuar completo e legível. */
html.md-dark body .app-page .app-panel-main .studio-prompt-tip{
 color:#F8EFEA!important;-webkit-text-fill-color:#F8EFEA!important;opacity:1!important;
}

/* Acessibilidade: foco visível para todos os controles do compositor. */
.app-page :is(.wardrobe-builder,.gallery) :is(button,select,summary,a,input):focus-visible{
 outline:3px solid #C45F7B!important;outline-offset:3px!important;
}
/* Não permitir que mensagens de interface percam contraste por opacidade, 
   sem tocar em estados realmente desabilitados. */
.app-page .wardrobe-builder :is(.wardrobe-lead,.wardrobe-hint,.wardrobe-count,.wardrobe-mini-hint),
.app-page .gallery .look-info{
 opacity:1!important;
}

/* ---- Componentes que já tinham histórico de baixo contraste ---- */
html.md-dark body .app-page .premium-rail button.rail-refresh[data-refresh],
html.md-dark body .app-page .premium-card button.rail-refresh[data-refresh],
html:not(.md-dark) body .app-page .premium-rail button.rail-refresh[data-refresh]{
 background:#F1E1D7!important;border:1px solid #CFB0A6!important;
 color:#69273C!important;-webkit-text-fill-color:#69273C!important;
 opacity:1!important;
}
html.md-dark body .perfume-main .perfume-form-actions button[data-perfume-cancel],
html:not(.md-dark) body .perfume-main .perfume-form-actions button[data-perfume-cancel]{
 background:#F1E1D7!important;border:1px solid #CFB0A6!important;
 color:#69273C!important;-webkit-text-fill-color:#69273C!important;
 opacity:1!important;
}
html:not(.md-dark) body .model3d-page .model3d-feature-lock,
html:not(.md-dark) body .model3d-page .model3d-feature-lock :is(strong,p,small,span),
html:not(.md-dark) body .model3d-page .model3d-usage-guide :is(strong,summary){
 color:#4C342B!important;-webkit-text-fill-color:#4C342B!important;
}
html.md-dark body .model3d-page .model3d-feature-lock,
html.md-dark body .model3d-page .model3d-feature-lock strong{
 color:#4A321E!important;-webkit-text-fill-color:#4A321E!important;
}
html.md-dark body .app-page .wardrobe-builder .wardrobe-group>summary .wardrobe-chevron,
html.md-dark body .app-page .wardrobe-builder .wardrobe-group>summary .wardrobe-group-icon{
 opacity:1!important;
}
/* Status e metadados devem sempre permanecer visíveis independentemente do estado. */
html.md-dark body .app-page .gallery .look-info .status,
html:not(.md-dark) body .app-page .gallery .look-info .status,
html.md-dark body .app-page .gallery .look-info>strong,
html:not(.md-dark) body .app-page .gallery .look-info>strong{
 text-shadow:none!important;opacity:1!important;
}
