/* Layout Principal */
.srw-reviews-container { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; color: #333; }
.srw-button {
    background-color: #333;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    display: inline-block;
    cursor: pointer;
    border: none;
}

/* Cabeçalho/Sumário */
.srw-summary-header {
    display: -webkit-box; display: -ms-flexbox; display: flex;
    -ms-flex-wrap: wrap; flex-wrap: wrap;
    -webkit-box-align: center; -ms-flex-align: center; align-items: center;
    margin: 0 -15px 30px -15px; padding-bottom: 20px; border-bottom: 1px solid #eee;
}
.srw-summary-header > div { padding: 0 15px; }

.srw-summary-left { text-align: center; }
.srw-average-rating { font-size: 48px; font-weight: bold; line-height: 1; }
.srw-total-reviews { font-size: 14px; color: #777; }

/* Estrelas */
.srw-stars-display, .srw-star-input { font-size: 22px; color: #ccc; }
.srw-stars-display .star.filled, .srw-star-input .star.filled { color: #ffb900; }
.srw-star-input .star { cursor: pointer; -webkit-transition: color 0.2s; transition: color 0.2s; }

/* Gráfico de Barras */
.srw-summary-center { -webkit-box-flex: 1; -ms-flex-positive: 1; flex-grow: 1; min-width: 250px; }
.srw-rating-bar-row {
    display: -webkit-box; display: -ms-flexbox; display: flex;
    -webkit-box-align: center; -ms-flex-align: center; align-items: center;
    font-size: 14px; margin-bottom: 4px;
}
.srw-rating-bar-row > * { margin-right: 8px; }
.srw-rating-bar-row > *:last-child { margin-right: 0; }
.srw-rating-bar-row .star { color: #ffb900; font-size: 16px; }
.srw-rating-bar { -webkit-box-flex: 1; -ms-flex-positive: 1; flex-grow: 1; height: 8px; background-color: #f0f0f0; border-radius: 4px; overflow: hidden; }
.srw-rating-bar-filled { height: 100%; background-color: #ffb900; border-radius: 4px; }
.srw-rating-count { min-width: 30px; text-align: right; color: #777; }

/* Filtros */
.srw-filters { display: -webkit-box; display: -ms-flexbox; display: flex; flex-wrap: wrap; margin-bottom: 30px; }
.srw-filters select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0 30px 0 12px;
    height: 40px;
    cursor: pointer;
    margin-right: 15px;
    margin-bottom: 10px;
    line-height: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23555' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}
.srw-filters select:last-child {
    margin-right: 0;
}

/* Lista de Comentários */
.srw-comment-list { list-style: none; margin: 0; padding: 0; }
.srw-comment-item { display: -webkit-box; display: -ms-flexbox; display: flex; padding: 25px 0; border-top: 1px solid #eee; align-items: flex-start; }
.srw-comment-author { min-width: 150px; margin-right: 20px; flex-shrink: 0; }
.srw-author-meta { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; }
.srw-author-meta time { font-size: 12px; color: #888; }
.srw-comment-body { -webkit-box-flex: 1; -ms-flex-positive: 1; flex-grow: 1; }
.srw-comment-body .srw-stars-display { margin-bottom: 10px; }
.srw-custom-field { font-size: 14px; color: #555; margin-top: 15px; }
.srw-media-attachment { margin-top: 15px; }

/* --- REGRAS FINAIS PARA MÍDIA ANEXADA --- */
div.srw-reviews-container .srw-media-attachment a.srw-image-trigger {
    display: block !important;
    width: 200px !important;
    height: 200px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background-color: #f0f0f0 !important;
}
div.srw-reviews-container .srw-media-attachment a.srw-image-trigger img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    cursor: pointer !important;
}
div.srw-reviews-container .srw-media-attachment video {
    display: block !important;
    width: 200px !important;
    height: 200px !important;
    border-radius: 8px !important;
    background-color: #000 !important;
    object-fit: cover !important;
}


/* Footer do Comentário (Botão Útil) */
.srw-comment-footer { margin-top: 20px; font-size: 14px; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; color: #777; }
.srw-comment-footer > * { margin-right: 10px; }
.srw-helpful-button { background: #f0f0f0; border: 1px solid #ddd; border-radius: 20px; padding: 5px 12px; cursor: pointer; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; }
.srw-helpful-button.disabled { cursor: not-allowed; opacity: 0.7; }
.srw-helpful-button > span { margin-left: 5px; }

/* Loader */
.srw-loader { width: 20px; height: 20px; border: 3px solid #f3f3f3; border-top: 3px solid #3498db; border-radius: 50%; -webkit-animation: spin 1s linear infinite; animation: spin 1s linear infinite; margin: 40px auto; }
@-webkit-keyframes spin { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); } }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Formulário Padrão (dentro e fora do popup) */
#commentform p { margin-bottom: 15px; }
#commentform label { display: block; font-weight: bold; margin-bottom: 5px; }
#commentform input[type="text"], #commentform input[type="email"], #commentform textarea, #commentform select { width: 100%; max-width: 500px; padding: 10px; border-radius: 4px; border: 1px solid #ccc; }
#commentform .form-submit input { width: auto; background: #333; color: #fff; font-weight: bold; cursor: pointer; }

/* ESTILOS PARA POPUP DE FORMULÁRIO */
.srw-modal-wrapper {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}
.srw-modal-wrapper.active {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}
.srw-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}
.srw-modal-content {
    position: relative;
    background-color: #fff;
    padding: 30px 40px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 100001;
}
.srw-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #888;
    cursor: pointer;
}

/* ESTILOS PARA O POPUP DE VISUALIZAÇÃO DE IMAGEM */
.srw-image-modal-content {
    position: relative;
    background: none;
    padding: 0;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
}
.srw-image-modal-content img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.4);
}
.srw-image-modal-content .srw-modal-close {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
    top: -30px;
    right: -10px;
}

/* --- AJUSTES PARA DISPOSITIVOS MÓVEIS --- */
@media (max-width: 767px) {
    .srw-summary-center {
        display: none;
    }
    .srw-summary-header {
        -webkit-box-pack: justify;
        -ms-flex-pack: justify;
        justify-content: space-between;
    }
    .srw-comment-item {
        flex-direction: column;
    }
    .srw-comment-author {
        margin-right: 0;
        margin-bottom: 15px;
    }
}