/* ==========================================
   CORES DA LOJA
   Para personalizar por cliente, sobrescreva estas variáveis
   no CSS personalizado do tema/Elementor.
========================================== */

:root{
--wdr-cor:#CC0000;
--wdr-cor-hover:#FF0000;
--wdr-cor-clara:#fff0f0;
--wdr-estrela:#f5a623;
--wdr-texto:#222;
--wdr-texto-suave:#777;
--wdr-borda:#eeeeee;
}


/* ==========================================
   TRIGGER (botão na página)
========================================== */

.wdr-trigger{
display:inline-flex;
align-items:center;
gap:5px;
padding:7px 12px;
border-radius:8px;
cursor:pointer;
background:#fff;
font-family:inherit;
font-size:14px;
transition:background .2s;
}

.wdr-trigger:hover{
background:#f0f0f0;
}

.wdr-title{
font-weight:600;
}

.wdr-stars{
color:#ffb400;
}

.wdr-rating{
font-weight:700;
}

.wdr-count{
color:#777;
}

.wdr-count-empty{
color:#aaa;
font-size:13px;
}


/* ==========================================
   RESET DOS BOTÕES
   O tema aplica estilo em todo <button>; aqui o plugin retoma o controle.
========================================== */

.wdr-popup button,
.wdr-lembrete button{
font-family:inherit;
text-transform:none;
letter-spacing:normal;
line-height:1.2;
box-shadow:none;
min-height:0;
margin:0;
}


/* ==========================================
   OVERLAY
========================================== */

.wdr-overlay{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background:rgba(0,0,0,.5);
display:flex;
justify-content:center;
align-items:center;
opacity:0;
visibility:hidden;
transition:opacity .25s, visibility .25s;
z-index:99999;
}

.wdr-overlay.active{
opacity:1;
visibility:visible;
}


/* ==========================================
   POPUP
========================================== */

.wdr-popup{
position:relative;
width:100%;
max-width:520px;
height:90vh;
background:#fff;
border-radius:18px;
display:flex;
flex-direction:column;
overflow:hidden;
transform:translateY(16px);
transition:transform .25s ease;
box-shadow:0 20px 60px rgba(0,0,0,.25);
}

.wdr-overlay.active .wdr-popup{
transform:translateY(0);
}


/* ==========================================
   BOTÃO FECHAR
========================================== */

.wdr-popup .wdr-close,
.wdr-popup .wdr-close:focus{
position:absolute;
top:14px;
right:14px;
width:32px;
height:32px;
border:none;
border-radius:50%;
background:#f2f2f2;
color:#444;
display:flex;
align-items:center;
justify-content:center;
cursor:pointer;
font-size:20px;
font-weight:400;
transition:background .2s, color .2s;
padding:0;
z-index:5;
line-height:1;
}

.wdr-popup .wdr-close:hover{
background:#e4e4e4;
color:#111;
}


/* ==========================================
   HEADER — nota à esquerda, barras à direita
========================================== */

.wdr-popup-header{
padding:18px 20px 16px;
flex-shrink:0;
}

.wdr-popup-header h2{
margin:0;
font-size:16px;
font-weight:700;
letter-spacing:.2px;
color:var(--wdr-texto);
text-align:center;
padding:0 36px; /* evita sobreposição com botão fechar */
}

.wdr-store-name{
text-align:center;
color:var(--wdr-texto-suave);
font-size:13px;
margin:2px 0 0;
}

.wdr-summary{
display:grid;
grid-template-columns:108px 1fr;
gap:18px;
align-items:center;
margin-top:14px;
padding:14px 16px;
background:#fafafa;
border-radius:14px;
}

.wdr-rating-box{
display:flex;
flex-direction:column;
align-items:center;
gap:4px;
padding-right:18px;
border-right:1px solid var(--wdr-borda);
}

.wdr-rating-number{
font-size:40px;
font-weight:800;
color:var(--wdr-texto);
line-height:1;
}

.wdr-rating-stars{
color:var(--wdr-estrela);
font-size:15px;
letter-spacing:1px;
white-space:nowrap;
}

.wdr-rating-total{
color:var(--wdr-texto-suave);
font-size:12px;
white-space:nowrap;
}

.wdr-distribution{
display:flex;
flex-direction:column;
gap:5px;
}

.wdr-line{
display:flex;
align-items:center;
gap:8px;
}

.wdr-line span{
width:24px;
font-size:12px;
color:#666;
flex-shrink:0;
}

.wdr-line strong{
width:18px;
text-align:right;
font-size:12px;
color:#666;
flex-shrink:0;
}

.wdr-bar{
flex:1;
height:6px;
background:#e9e9e9;
border-radius:20px;
overflow:hidden;
}

.wdr-fill{
height:100%;
background:var(--wdr-estrela);
border-radius:20px;
transition:width .4s ease;
}


/* ==========================================
   ABAS — largura total, sublinhado na ativa
========================================== */

.wdr-tabs{
display:flex;
background:#fff;
border-bottom:1px solid var(--wdr-borda);
flex-shrink:0;
padding:0 12px;
}

.wdr-popup .wdr-tab,
.wdr-popup .wdr-tab:focus{
flex:1;
border:none;
border-bottom:3px solid transparent;
border-radius:0;
background:transparent;
cursor:pointer;
padding:13px 8px 11px;
font-size:14px;
font-weight:600;
color:var(--wdr-texto-suave);
transition:color .2s, border-color .2s;
white-space:nowrap;
outline:none;
}

.wdr-popup .wdr-tab:hover{
background:transparent;
color:var(--wdr-texto);
}

.wdr-popup .wdr-tab.active,
.wdr-popup .wdr-tab.active:hover,
.wdr-popup .wdr-tab.active:focus{
color:var(--wdr-cor);
border-bottom-color:var(--wdr-cor);
background:transparent;
}

.wdr-popup .wdr-tab:focus-visible{
outline:2px solid var(--wdr-cor);
outline-offset:-4px;
}


/* ==========================================
   CONTAINER DAS ABAS
========================================== */

.wdr-content{
height:0;
flex:1;
overflow:hidden;
display:flex;
flex-direction:column;
}

.wdr-tab-content{
display:none;
padding:8px 20px 20px;
overflow-y:auto;
min-height:0;
flex:1;
}

.wdr-tab-content.active{
display:flex;
flex-direction:column;
overflow-y:auto;
min-height:0;
}

.wdr-tab-content h3{
font-size:12px;
font-weight:700;
color:#999;
margin:12px 0 12px;
text-transform:uppercase;
letter-spacing:.5px;
}


/* ==========================================
   CARD DA AVALIAÇÃO
========================================== */

.wdr-review-card{
padding:16px 0;
border-bottom:1px solid var(--wdr-borda);
}

.wdr-review-card:last-child{
border-bottom:none;
}

.wdr-review-top{
display:flex;
align-items:center;
gap:12px;
}

.wdr-avatar{
width:42px;
height:42px;
border-radius:50%;
background:var(--wdr-cor);
color:#fff;
display:flex;
justify-content:center;
align-items:center;
font-weight:700;
font-size:16px;
flex-shrink:0;
overflow:hidden;
}

.wdr-avatar-img{
width:42px;
height:42px;
border-radius:50%;
object-fit:cover;
display:block;
}

.wdr-avatar-initial{
width:42px;
height:42px;
border-radius:50%;
background:var(--wdr-cor);
color:#fff;
display:flex;
justify-content:center;
align-items:center;
font-weight:700;
font-size:16px;
flex-shrink:0;
}

.wdr-review-user{
flex:1;
min-width:0;
}

.wdr-review-linha{
display:flex;
align-items:baseline;
justify-content:space-between;
gap:10px;
}

.wdr-review-nome{
font-size:15px;
font-weight:700;
color:var(--wdr-texto);
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}

.wdr-review-date{
color:#aaa;
font-size:12px;
flex-shrink:0;
}

.wdr-review-meta{
display:flex;
align-items:center;
gap:8px;
margin-top:3px;
flex-wrap:wrap;
}

.wdr-review-stars{
color:var(--wdr-estrela);
font-size:14px;
letter-spacing:1px;
}

.wdr-verified-badge{
font-size:11px;
font-weight:700;
color:#1a7f37;
background:#e9f7ee;
padding:2px 8px;
border-radius:20px;
}

.wdr-pending-badge{
font-size:11px;
font-weight:600;
color:#a15c00;
background:#fff3e0;
padding:2px 8px;
border-radius:20px;
}

.wdr-review-product{
display:inline-block;
margin-top:10px;
padding:4px 10px;
background:#f4f4f4;
color:#555;
font-size:12px;
font-weight:600;
border-radius:20px;
}

.wdr-review-comment{
margin-top:8px;
line-height:1.55;
color:#444;
font-size:14px;
}

.wdr-review-images{
display:flex;
gap:8px;
margin-top:10px;
flex-wrap:wrap;
}

.wdr-review-images img,
.wdr-review-image{
width:80px;
height:80px;
border-radius:10px;
object-fit:cover;
cursor:pointer;
transition:opacity .2s;
}

.wdr-review-image:hover{
opacity:.85;
}

.wdr-review-reply{
margin-top:12px;
padding:10px 14px;
background:var(--wdr-cor-clara);
border-left:3px solid var(--wdr-cor);
border-radius:0 10px 10px 0;
}

.wdr-review-reply strong{
display:block;
margin-bottom:3px;
color:var(--wdr-cor);
font-size:13px;
}

.wdr-review-reply p{
margin:0;
color:#555;
line-height:1.5;
font-size:13px;
}


/* ==========================================
   VAZIO / CARREGAR MAIS / LOGIN
========================================== */

.wdr-empty{
padding:32px 10px;
text-align:center;
color:#999;
font-size:14px;
line-height:1.6;
}

.wdr-popup .wdr-load-more,
.wdr-popup .wdr-load-more:focus{
display:block;
width:100%;
margin-top:12px;
padding:12px;
background:#f5f5f5;
border:none;
border-radius:20px;
cursor:pointer;
font-weight:600;
color:var(--wdr-cor);
font-size:14px;
transition:background .2s;
}

.wdr-popup .wdr-load-more:hover{
background:#ebebeb;
color:var(--wdr-cor);
}

.wdr-popup .wdr-load-more:disabled{
color:#aaa;
cursor:default;
}

.wdr-login-link{
display:inline-block;
margin-top:12px;
color:var(--wdr-cor);
font-weight:700;
font-size:14px;
text-decoration:none;
border:2px solid var(--wdr-cor);
padding:10px 22px;
border-radius:20px;
transition:background .2s, color .2s;
}

.wdr-login-link:hover{
background:var(--wdr-cor);
color:#fff;
}


/* ==========================================
   GALERIA
========================================== */

.wdr-gallery-grid{
display:grid;
grid-template-columns:repeat(3,1fr);
gap:8px;
}

.wdr-gallery-image{
width:100%;
aspect-ratio:1/1;
object-fit:cover;
border-radius:10px;
cursor:pointer;
transition:opacity .2s;
}

.wdr-gallery-image:hover{
opacity:.85;
}


/* ==========================================
   LIGHTBOX
========================================== */

.wdr-lightbox{
display:none;
position:fixed;
inset:0;
background:rgba(0,0,0,.88);
z-index:999999;
justify-content:center;
align-items:center;
}

.wdr-lightbox.active{
display:flex;
}

.wdr-lightbox img{
max-width:90vw;
max-height:85vh;
border-radius:10px;
box-shadow:0 4px 30px rgba(0,0,0,.4);
}

.wdr-lightbox-close{
position:absolute;
top:18px;
right:24px;
color:#fff;
font-size:32px;
cursor:pointer;
line-height:1;
opacity:.8;
}

.wdr-lightbox-close:hover{
opacity:1;
}


/* ==========================================
   FORMULÁRIO DE AVALIAÇÃO
========================================== */

.wdr-review-form{
display:flex;
flex-direction:column;
gap:8px;
padding:0 0 24px;
}

.wdr-field-label{
font-weight:700;
font-size:13px;
color:#333;
margin-top:8px;
}

.wdr-field-hint{
font-size:12px;
color:#aaa;
margin:0;
}

.wdr-review-form select,
.wdr-review-form input[type="text"],
.wdr-review-form textarea{
width:100%;
padding:12px 14px;
border:1px solid #ddd;
border-radius:10px;
font-family:inherit;
font-size:14px;
background:#fff;
outline:none;
transition:border-color .2s, box-shadow .2s;
box-sizing:border-box;
}

.wdr-review-form select:focus,
.wdr-review-form input[type="text"]:focus,
.wdr-review-form textarea:focus{
border-color:var(--wdr-cor);
box-shadow:0 0 0 3px var(--wdr-cor-clara);
}

.wdr-star-input{
display:flex;
gap:6px;
font-size:36px;
line-height:1;
color:#d9d9d9;
cursor:pointer;
user-select:none;
}

.wdr-star{
transition:transform .1s ease, color .1s ease;
}

.wdr-star:hover{
transform:scale(1.15);
}

.wdr-star.active{
color:var(--wdr-estrela);
}

.wdr-upload{
display:flex;
flex-direction:column;
align-items:center;
gap:2px;
padding:16px;
border:2px dashed #ddd;
border-radius:12px;
background:#fafafa;
cursor:pointer;
text-align:center;
transition:border-color .2s, background .2s;
}

.wdr-upload:hover{
border-color:var(--wdr-cor);
background:var(--wdr-cor-clara);
}

.wdr-upload-icone{
font-size:24px;
line-height:1;
}

.wdr-upload-texto{
font-size:14px;
font-weight:700;
color:#333;
margin-top:4px;
}

.wdr-upload small{
font-size:12px;
color:#999;
}

.wdr-upload-input{
position:absolute;
width:1px;
height:1px;
opacity:0;
pointer-events:none;
}

.wdr-photo-preview{
display:flex;
flex-wrap:wrap;
gap:8px;
}

.wdr-preview-thumb{
width:60px;
height:60px;
object-fit:cover;
border-radius:8px;
border:2px solid #f0f0f0;
}

.wdr-form-message{
font-size:13px;
padding:4px 0;
}

.wdr-form-message-success{
color:#1a7f37;
}

.wdr-form-message-error{
color:#c0392b;
}

.wdr-popup .wdr-submit-review,
.wdr-popup .wdr-submit-review:focus{
background:var(--wdr-cor);
color:#fff;
border:none;
padding:14px;
border-radius:20px;
font-weight:700;
font-size:15px;
cursor:pointer;
transition:background .2s;
margin-top:6px;
}

.wdr-popup .wdr-submit-review:hover{
background:var(--wdr-cor-hover);
color:#fff;
}

.wdr-popup .wdr-submit-review:disabled{
opacity:.65;
cursor:default;
}


/* ==========================================
   LEMBRETE DE AVALIAÇÃO
========================================== */

.wdr-lembrete{
position:fixed;
inset:0;
z-index:99998;
display:flex;
justify-content:center;
align-items:center;
padding:16px;
background:rgba(0,0,0,.45);
opacity:0;
visibility:hidden;
transition:opacity .25s, visibility .25s;
}

.wdr-lembrete.active{
opacity:1;
visibility:visible;
}

.wdr-lembrete-box{
width:100%;
max-width:380px;
background:#fff;
border-radius:18px;
padding:28px 24px 22px;
text-align:center;
box-shadow:0 20px 60px rgba(0,0,0,.25);
transform:translateY(16px);
transition:transform .25s ease;
}

.wdr-lembrete.active .wdr-lembrete-box{
transform:translateY(0);
}

.wdr-lembrete-icone{
display:inline-flex;
align-items:center;
justify-content:center;
width:56px;
height:56px;
border-radius:50%;
background:#fff7e6;
font-size:28px;
line-height:1;
}

.wdr-lembrete-box h3{
margin:14px 0 8px;
font-size:19px;
font-weight:800;
color:var(--wdr-texto);
}

.wdr-lembrete-box p{
margin:0 0 20px;
font-size:14px;
line-height:1.55;
color:#555;
}

.wdr-lembrete-acoes{
display:flex;
flex-direction:column;
gap:8px;
}

.wdr-lembrete .wdr-lembrete-avaliar,
.wdr-lembrete .wdr-lembrete-avaliar:focus{
background:var(--wdr-cor);
color:#fff;
border:none;
border-radius:20px;
padding:14px;
font-size:15px;
font-weight:700;
cursor:pointer;
}

.wdr-lembrete .wdr-lembrete-avaliar:hover{
background:var(--wdr-cor-hover);
color:#fff;
}

.wdr-lembrete .wdr-lembrete-depois,
.wdr-lembrete .wdr-lembrete-depois:focus{
background:transparent;
color:var(--wdr-texto-suave);
border:none;
border-radius:20px;
padding:10px;
font-size:14px;
font-weight:600;
cursor:pointer;
}

.wdr-lembrete .wdr-lembrete-depois:hover{
background:#f5f5f5;
color:var(--wdr-texto);
}


/* ==========================================
   SKELETON LOADING
========================================== */

.wdr-skeleton-card{
padding:16px 0;
border-bottom:1px solid var(--wdr-borda);
display:flex;
gap:12px;
align-items:flex-start;
}

.wdr-skeleton-avatar{
width:42px;
height:42px;
border-radius:50%;
flex-shrink:0;
background:linear-gradient(90deg,#eee 25%,#f5f5f5 37%,#eee 63%);
background-size:400% 100%;
animation:wdr-skeleton 1.4s ease infinite;
}

.wdr-skeleton-lines{
flex:1;
display:flex;
flex-direction:column;
gap:7px;
padding-top:4px;
}

.wdr-skeleton-line{
height:9px;
border-radius:4px;
background:linear-gradient(90deg,#eee 25%,#f5f5f5 37%,#eee 63%);
background-size:400% 100%;
animation:wdr-skeleton 1.4s ease infinite;
}

@keyframes wdr-skeleton{
0%{background-position:100% 50%;}
100%{background-position:0 50%;}
}


/* ==========================================
   SCROLL
========================================== */

.wdr-tab-content::-webkit-scrollbar{
width:5px;
}

.wdr-tab-content::-webkit-scrollbar-thumb{
background:#ddd;
border-radius:10px;
}


/* ==========================================
   MOBILE
========================================== */

@media(max-width:520px){

.wdr-popup{
height:92vh;
max-height:92vh;
border-radius:18px 18px 0 0;
align-self:flex-end;
transform:translateY(40px);
}

.wdr-overlay{
align-items:flex-end;
}

.wdr-popup-header{
padding:16px 16px 12px;
}

.wdr-summary{
grid-template-columns:92px 1fr;
gap:14px;
padding:12px 14px;
margin-top:12px;
}

.wdr-rating-box{
padding-right:14px;
}

.wdr-rating-number{
font-size:34px;
}

.wdr-rating-stars{
font-size:13px;
}

.wdr-tabs{
padding:0 4px;
}

.wdr-tab-content{
padding:8px 16px 20px;
}

.wdr-gallery-grid{
grid-template-columns:repeat(2,1fr);
}

.wdr-lembrete{
align-items:flex-end;
padding:0;
}

.wdr-lembrete-box{
max-width:none;
border-radius:18px 18px 0 0;
padding:26px 20px 24px;
}

}
