/* =========================================
   VARIÁVEIS GLOBAIS E SCOPE
   ========================================= */
.tht-reviews-list-wrapper,
.tht-review-form-container {
    --green-primary: #52c8a2;
    --green-dark:    #3aab88;
    --green-deeper:  #2a8a6e;
    --green-light:   #e8f9f4;
    --green-mid:     #b8edd9;
    --green-soft:    #f0faf6;
    --text-dark:     #1a1a1a;
    --text-mid:      #444;
    --text-mute:     #888;
    --white:         #ffffff;
    --border-light:  #b8edd9;
    --radius-sm:     8px;
    --radius-md:     14px;
    --transition:    all .2s cubic-bezier(.4,0,.2,1);
    
    font-family: 'Inter', sans-serif !important;
    color: var(--text-dark) !important;
    max-width: 900px;
    margin: 40px auto;
    display: block !important;
}

/* =========================================
   CABEÇALHO E FORMULÁRIO DISCRETO
   ========================================= */
.tht-form-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.tht-form-header h3 { font-size: 24px !important; font-weight: 800; margin: 0; letter-spacing: -.02em; }

.tht-btn-outline {
    background: transparent; border: 2px solid var(--green-primary); color: var(--green-primary);
    padding: 8px 16px; border-radius: var(--radius-sm); font-weight: 700; cursor: pointer; transition: var(--transition);
}
.tht-btn-outline:hover { background: var(--green-primary); color: var(--white); }

.tht-form-hidden { max-height: 0; overflow: hidden; opacity: 0; transition: all 0.4s ease-in-out; }
.tht-form-hidden.open { max-height: 1200px; opacity: 1; margin-bottom: 40px; overflow: visible; }

.tht-review-form {
    background: var(--white); border: 2px solid var(--border-light); border-radius: var(--radius-md);
    padding: 24px; box-shadow: 4px 4px 0 var(--green-soft);
}

.tht-form-row { display: flex; gap: 16px; }
.tht-form-group.tht-half { flex: 1; }
.tht-form-group { margin-bottom: 16px; }
.tht-form-group label { display: block; font-size: 13px; font-weight: 700; color: var(--text-mid); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .05em; }
.tht-form-group input[type="text"], .tht-form-group textarea {
    width: 100%; padding: 14px; border: 2px solid #eaeaea; border-radius: var(--radius-sm); font-family: inherit; font-size: 15px; color: var(--text-dark); transition: var(--transition); background: #fdfdfd; box-sizing: border-box;
}
.tht-form-group input:focus, .tht-form-group textarea:focus { outline: none; border-color: var(--green-primary); background: var(--white); }

/* Estrelas do Form (Input) */
.tht-stars-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.tht-stars-input input { display: none !important; }
.tht-stars-input label { cursor: pointer; color: #ddd; transition: var(--transition); display: inline-block !important; }
.tht-stars-input label svg { width: 28px !important; height: 28px !important; fill: currentColor !important; display: block !important; }
.tht-stars-input label:hover, .tht-stars-input label:hover ~ label, .tht-stars-input input:checked ~ label { color: #ffc107 !important; }

/* Input de Arquivo */
.tht-file-input { display: none !important; }
.tht-file-label {
    display: inline-flex; align-items: center; padding: 10px 16px; background: var(--green-soft); color: var(--green-deeper);
    border: 1px dashed var(--green-dark); border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--transition);
}
.tht-file-label:hover { background: var(--green-light); }
.tht-file-name { font-size: 12px; color: var(--text-mute); margin-left: 10px; }

/* Botão Enviar */
.tht-submit-btn {
    background: var(--green-primary); color: var(--white); border: none; padding: 14px 24px; border-radius: var(--radius-sm);
    font-weight: 700; font-size: 15px; cursor: pointer; transition: var(--transition); margin-top: 10px;
}
.tht-submit-btn:hover { background: var(--green-dark); transform: translateY(-2px); box-shadow: 0 4px 10px rgba(82,200,162,0.3); }

@media (max-width: 600px) { .tht-form-row { flex-direction: column; gap: 0; } }

/* =========================================
   MASONRY GRID (Layout Pinterest)
   ========================================= */
.tht-masonry-grid {
    column-count: 2;
    column-gap: 20px;
    width: 100% !important;
}

.tht-review-item {
    break-inside: avoid; 
    display: inline-block;
    width: 100%;
    margin-bottom: 20px;
    background: var(--white);
    border: 1px solid #eaeaea;
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: var(--transition);
}
.tht-review-item:hover { box-shadow: 0 8px 25px rgba(82,200,162,0.15); transform: translateY(-2px); }

/* Ajuste Responsivo Tablet e Celular: Quebra para 1 coluna apenas em telas pequenas (<600px) */
@media (max-width: 600px) { .tht-masonry-grid { column-count: 1; } }

/* =========================================
   ESTRUTURA DO CARD DE REVIEW
   ========================================= */
.tht-review-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.tht-author-info { display: flex; align-items: center; gap: 12px; }
.tht-avatar {
    width: 40px; height: 40px; border-radius: 50%; background: var(--green-primary); color: var(--white);
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px;
}
.tht-review-name { font-weight: 700; font-size: 15px; color: var(--text-dark); display: flex; align-items: center; gap: 6px; }
.tht-verified { color: var(--green-primary); }
.tht-review-date { font-size: 12px; color: var(--text-mute); margin-top: 2px; }

/* Blindagem Absoluta das Estrelas (Lista) */
.tht-stars { display: flex; gap: 2px; }
.tht-stars svg { 
    width: 16px !important; 
    height: 16px !important; 
    display: inline-block !important; 
}
.tht-stars svg.tht-star-full { fill: #ffc107 !important; color: #ffc107 !important; }
.tht-stars svg.tht-star-empty { fill: #e0e0e0 !important; color: #e0e0e0 !important; }

.tht-review-title { font-size: 16px !important; font-weight: 800; margin: 0 0 8px 0; color: var(--text-dark); }
.tht-review-content { font-size: 14px !important; color: var(--text-mid); line-height: 1.6; margin-bottom: 16px; }

/* =========================================
   GALERIA INTELIGENTE DE IMAGENS
   ========================================= */
.tht-review-gallery { display: grid; gap: 8px; margin-bottom: 16px; }
.tht-review-gallery.single { grid-template-columns: 1fr; }
.tht-review-gallery.single img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius-sm); cursor: zoom-in; border: 1px solid #eee; }
.tht-review-gallery.multi { grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); }
.tht-review-gallery.multi img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius-sm); cursor: zoom-in; border: 1px solid #eee; transition: var(--transition); }
.tht-review-gallery img:hover { border-color: var(--green-primary); transform: scale(1.02); }

/* =========================================
   RODAPÉ (LIKES) E PAGINAÇÃO
   ========================================= */
.tht-review-footer { border-top: 1px solid #f1f1f1; padding-top: 16px; display: flex; align-items: center; }
.tht-like-btn {
    display: inline-flex; align-items: center; gap: 6px; background: #fdfdfd; border: 1px solid #ddd; padding: 6px 12px;
    border-radius: 100px; font-size: 12px; font-weight: 600; color: var(--text-mid); cursor: pointer; transition: var(--transition);
}
.tht-like-btn svg { width: 14px !important; height: 14px !important; fill: currentColor; display: block !important; }
.tht-like-btn:hover { background: var(--green-soft); border-color: var(--green-mid); color: var(--green-dark); }
.tht-like-btn.tht-already-liked { background: var(--green-primary); border-color: var(--green-primary); color: var(--white); cursor: default; }

.tht-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 30px; }
.tht-pagination a, .tht-pagination span { padding: 8px 14px; background: var(--white); border: 1px solid #ddd; border-radius: var(--radius-sm); color: var(--text-dark); font-weight: 600; text-decoration: none; transition: var(--transition); }
.tht-pagination a:hover { border-color: var(--green-primary); color: var(--green-primary); }
.tht-pagination .current { background: var(--green-primary); color: var(--white); border-color: var(--green-primary); }

/* =========================================
   LIGHTBOX DO PLUGIN
   ========================================= */
.tht-lightbox {
    opacity: 0 !important; visibility: hidden !important; pointer-events: none !important;
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: rgba(0, 0, 0, 0.85);
    z-index: 999999 !important; display: flex; align-items: center; justify-content: center; transition: opacity 0.3s ease, visibility 0.3s ease;
}
.tht-lightbox.tht-active { opacity: 1 !important; visibility: visible !important; pointer-events: auto !important; }
.tht-lightbox .tht-lightbox-content { position: relative; max-width: 90%; max-height: 90vh; }
.tht-lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: var(--radius-sm); }
.tht-lightbox-close { position: absolute; top: 20px; right: 30px; background: none; border: none; color: white; font-size: 40px; cursor: pointer; z-index: 100000; }