/**
 * Estilos para ZonaTech Reviews - Nueva Era
 */

/* Contenedor principal de reseñas */
.zt-reviews-wrapper {
    display: grid !important;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) !important;
    gap: 48px !important;
    align-items: start !important;
    margin-top: 16px !important;
}

.zt-reviews-wrapper::before,
.zt-reviews-wrapper::after {
    display: none !important;
}

/* Columna de comentarios */
.zt-reviews-list-col {
    min-width: 0;
}

.zt-reviews-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 28px;
}

.zt-reviews-title {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 !important;
}

.zt-reviews-score-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 6px 14px;
    border-radius: 999px;
}

.zt-reviews-score-number {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
}

.zt-reviews-score-stars .star-rating {
    float: none !important;
    margin: 0 !important;
    color: #f59e0b !important;
}

/* Lista de valoraciones */
.zt-commentlist {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.zt-commentlist li.review {
    padding: 24px 0 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    margin: 0 !important;
}

.zt-commentlist li.review:last-child {
    border-bottom: none !important;
}

.zt-commentlist .comment_container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.zt-commentlist .comment-text {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.zt-commentlist .star-rating {
    float: right !important;
    color: #f59e0b !important;
    font-size: 15px !important;
}

.zt-commentlist .meta {
    font-size: 14px !important;
    color: #64748b !important;
    margin-bottom: 6px !important;
}

.zt-commentlist .meta strong {
    color: #0f172a !important;
    font-weight: 700 !important;
    font-size: 15px !important;
}

/* Insignia de compra verificada */
.zt-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #ecfdf5;
    color: #047857;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 999px;
    margin-left: 8px;
    vertical-align: middle;
    border: 1px solid #a7f3d0;
}

.zt-verified-badge svg {
    stroke-width: 2.8;
}

.zt-commentlist .description {
    font-size: 15px;
    line-height: 1.6;
    color: #334155;
    margin: 8px 0 0 0;
}

/* Galería de fotos en la reseña */
.zt-review-photos-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.zt-review-photo-item {
    position: relative;
    width: 76px;
    height: 76px;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.zt-review-photo-item:hover {
    transform: translateY(-2px);
    border-color: #0d71e9;
    box-shadow: 0 4px 12px rgba(13, 113, 233, 0.15);
}

.zt-review-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.zt-photo-zoom-icon {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.zt-review-photo-item:hover .zt-photo-zoom-icon {
    opacity: 1;
}

/* Estado sin valoraciones */
.zt-reviews-empty {
    text-align: center;
    padding: 40px 24px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    color: #64748b;
}

.zt-reviews-empty svg {
    color: #94a3b8;
    margin-bottom: 12px;
}

.zt-reviews-empty p {
    font-size: 16px;
    font-weight: 600;
    color: #334155;
    margin: 0 0 6px 0;
}

.zt-reviews-empty small {
    font-size: 13px;
}

/* Columna derecha: Tarjeta del formulario / avisos */
.zt-reviews-form-col {
    min-width: 0;
}

.zt-review-card-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Cabecera del formulario verificado */
.zt-form-verified-header {
    margin-bottom: 22px;
}

.zt-verified-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 12px;
}

.zt-form-verified-header h3 {
    font-size: 19px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px 0;
}

.zt-form-verified-header p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Grupos del formulario */
.zt-field-group {
    margin-bottom: 20px;
}

.zt-field-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.zt-req {
    color: #ef4444;
}

/* Selector interactivo de estrellas */
.zt-star-picker {
    display: inline-flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
}

.zt-star-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.zt-star-label {
    font-size: 32px;
    color: #cbd5e1;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s ease, transform 0.15s ease;
    user-select: none;
}

.zt-star-picker:hover .zt-star-label {
    color: #cbd5e1;
}

.zt-star-label:hover,
.zt-star-label:hover ~ .zt-star-label {
    color: #f59e0b !important;
    transform: scale(1.1);
}

.zt-star-radio:checked ~ .zt-star-label {
    color: #f59e0b;
}

.zt-star-caption {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #f59e0b;
    min-height: 18px;
    margin-top: 4px;
}

/* Textarea estilizado */
.zt-textarea {
    width: 100% !important;
    min-height: 100px;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    padding: 12px 14px !important;
    font-size: 14px !important;
    font-family: inherit !important;
    color: #0f172a !important;
    background: #fff !important;
    box-sizing: border-box !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.zt-textarea:focus {
    outline: none !important;
    border-color: #0d71e9 !important;
    box-shadow: 0 0 0 3px rgba(13, 113, 233, 0.15) !important;
}

/* Zona de subida de fotos */
.zt-dropzone-box {
    border: 1.5px dashed #cbd5e1;
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: border-color 0.18s ease, background-color 0.18s ease;
}

.zt-dropzone-box:hover {
    border-color: #0d71e9;
    background: #eff6ff;
}

.zt-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.18s ease;
}

.zt-upload-btn:hover {
    border-color: #0d71e9;
    color: #0d71e9;
    box-shadow: 0 2px 6px rgba(13, 113, 233, 0.15);
}

.zt-upload-btn svg {
    color: #0d71e9;
}

.zt-dropzone-hint {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-top: 8px;
}

/* Previsualización de fotos subidas */
.zt-preview-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    justify-content: center;
}

.zt-preview-item {
    position: relative;
    width: 68px;
    height: 68px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.zt-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.zt-preview-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(15, 23, 42, 0.75);
    color: #fff;
    border: none;
    border-radius: 999px;
    width: 18px;
    height: 18px;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.zt-preview-remove:hover {
    background: #ef4444;
}

/* Mensajes del formulario */
.zt-form-message {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1.4;
}

.zt-form-message.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.zt-form-message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Botón de envío */
.zt-submit-btn {
    width: 100% !important;
    background: #0d71e9 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 14px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: background-color 0.18s ease, transform 0.12s ease !important;
}

.zt-submit-btn:hover {
    background: #005bb5 !important;
}

.zt-submit-btn:disabled {
    opacity: 0.65 !important;
    cursor: not-allowed !important;
}

.zt-btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    border-top-color: #fff;
    animation: zt-spin 0.8s linear infinite;
}

@keyframes zt-spin {
    to { transform: rotate(360deg); }
}

/* Tarjetas de aviso para no autorizados / ya reseñaron */
.zt-notice-card {
    text-align: center;
    padding: 28px 18px;
    border-radius: 14px;
}

.zt-notice-card .zt-notice-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    margin-bottom: 14px;
}

.zt-notice-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.zt-notice-card p {
    font-size: 14px;
    line-height: 1.5;
    color: #64748b;
    margin: 0 0 16px 0;
}

/* Estados de las tarjetas de aviso */
.zt-notice-card--success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.zt-notice-card--success .zt-notice-icon {
    background: #dcfce7;
    color: #16a34a;
}

.zt-notice-card--success h3 {
    color: #15803d;
}

.zt-notice-card--locked {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.zt-notice-card--locked .zt-notice-icon {
    background: #e2e8f0;
    color: #475569;
}

.zt-notice-card--locked h3 {
    color: #1e293b;
}

.zt-notice-card--guest {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.zt-notice-card--guest .zt-notice-icon {
    background: #dbeafe;
    color: #0d71e9;
}

.zt-notice-card--guest h3 {
    color: #1e3a8a;
}

.zt-login-link-btn {
    display: inline-block !important;
    background: #0d71e9 !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 10px 22px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    transition: background-color 0.18s ease !important;
}

.zt-login-link-btn:hover {
    background: #005bb5 !important;
    color: #ffffff !important;
}

/* Modal Lightbox */
.zt-review-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.22s ease;
}

.zt-review-lightbox.is-open {
    display: flex;
    opacity: 1;
}

.zt-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(4px);
}

.zt-lightbox-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.zt-lightbox-close {
    position: absolute;
    top: -42px;
    right: 0;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    transition: transform 0.15s ease;
}

.zt-lightbox-close:hover {
    transform: scale(1.15);
}

.zt-lightbox-content {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

.zt-lightbox-content img {
    max-width: 88vw;
    max-height: 78vh;
    object-fit: contain;
    display: block;
}

.zt-lightbox-caption {
    padding: 10px 16px;
    font-size: 13px;
    color: #e2e8f0;
    background: #0f172a;
    text-align: center;
}

/* Responsividad móvil */
@media (max-width: 767px) {
    .zt-reviews-wrapper {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
    }

    .zt-review-card-box {
        padding: 20px 16px;
    }

    .zt-star-label {
        font-size: 28px;
    }
}

/* Verification follows the label; product metadata sits below the reviewer name. */
.zt-verified-badge{display:inline-flex;align-items:center;gap:5px;background:transparent;color:#64748b;font-size:11px;line-height:1.4;font-weight:500;padding:0;border:0;margin:0;vertical-align:middle}
.zt-verified-badge .zt-verified-check{width:14px;height:14px;flex-shrink:0}
.zt-commentlist .zt-review-author-meta .woocommerce-review__author{display:block}
.zt-commentlist .zt-review-author-meta .zt-verified-badge{display:flex;width:fit-content;margin:3px 0 5px}
.zt-commentlist .zt-review-author-meta .woocommerce-review__published-date{display:block;font-size:11px;line-height:1.5}
.zt-form-verified-header>.zt-verified-badge{color:#047857;margin-bottom:12px}


/* A single calm surface for writing or status, without stacked frames. */
body .zt-reviews-wrapper #review_form_wrapper{padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
.zt-reviews-wrapper #review_form.zt-review-card-box{padding:28px;background:#f5f7fa;border:0;border-radius:16px;box-shadow:none}
.zt-reviews-wrapper .zt-notice-card{display:grid;grid-template-columns:44px minmax(0,1fr);align-items:start;gap:16px;padding:0;text-align:left;background:transparent;border:0;border-radius:0}
.zt-reviews-wrapper .zt-notice-card .zt-notice-icon{display:grid;place-items:center;width:44px;height:44px;margin:0;border:0}
.zt-reviews-wrapper .zt-notice-card .zt-notice-icon svg{width:23px;height:23px}
.zt-reviews-wrapper .zt-notice-content h3{font-size:20px;line-height:1.3;letter-spacing:-.3px;color:#10213d;margin:0 0 8px}
.zt-reviews-wrapper .zt-notice-content p{font-size:14px;line-height:1.65;color:#64748b;margin:0;max-width:440px}
.zt-reviews-wrapper .zt-notice-content .zt-login-link-btn{margin-top:18px;background:var(--zt-theme-accent,#032852)!important;border-radius:10px!important;padding:11px 20px!important}
.zt-reviews-wrapper .zt-form-verified-header h3{font-size:23px;line-height:1.25;letter-spacing:-.4px;margin-bottom:9px}
.zt-reviews-wrapper .zt-form-verified-header p{line-height:1.65}
.zt-reviews-wrapper .zt-form-verified-header{margin-bottom:26px}
.zt-reviews-wrapper .zt-dropzone-box,.zt-reviews-wrapper .zt-dropzone-box:hover{padding:0;border:0;background:transparent;border-radius:0;text-align:left}
.zt-reviews-wrapper .zt-upload-btn{border:1px dashed #b9c7d8;border-radius:10px;background:transparent;box-shadow:none;min-height:46px;padding:10px 16px;color:#032852}
.zt-reviews-wrapper .zt-upload-btn svg{color:inherit;width:20px;height:20px}
.zt-reviews-wrapper .zt-dropzone-hint{line-height:1.5;font-size:11px;margin-top:8px}
.zt-reviews-wrapper .zt-preview-gallery{justify-content:flex-start;margin-top:12px}
.zt-reviews-wrapper .zt-preview-gallery:empty{margin:0}
.zt-reviews-wrapper .zt-submit-btn{background:var(--zt-theme-accent,#032852)!important;box-shadow:none}
.zt-reviews-wrapper .zt-field-group{margin-bottom:22px}
.zt-reviews-wrapper .zt-star-caption:empty{min-height:0;margin:0}
.zt-reviews-wrapper .zt-star-radio:focus-visible+.zt-star-label{outline:2px solid #032852;outline-offset:3px;border-radius:4px}
.zt-reviews-wrapper .zt-reviews-empty{padding:28px 0;text-align:left;background:none;border:0;border-radius:0}
.zt-reviews-wrapper .zt-reviews-empty svg{width:28px;height:28px}
#reviews.zt-reviews-wrapper .zt-commentlist .comment_container{display:grid;grid-template-columns:42px minmax(0,1fr);gap:14px;align-items:start}
#reviews.zt-reviews-wrapper #comments .zt-commentlist .comment_container>img.avatar{position:static;float:none;width:42px;height:42px;max-width:none;padding:0;border:0;border-radius:50%;object-fit:cover;background:none;box-shadow:none}
#reviews.zt-reviews-wrapper .zt-commentlist .comment-text{min-width:0;grid-column:2}
.zt-reviews-wrapper .zt-reviews-header{margin-bottom:12px;padding-bottom:18px}
@media(max-width:767px){.zt-reviews-wrapper{gap:24px!important}.zt-reviews-wrapper #review_form.zt-review-card-box{padding:22px 20px}.zt-reviews-wrapper .zt-notice-card{grid-template-columns:36px minmax(0,1fr);gap:12px}.zt-reviews-wrapper .zt-notice-card .zt-notice-icon{width:36px;height:36px}.zt-reviews-wrapper .zt-notice-content h3{font-size:18px}.zt-reviews-wrapper .zt-form-verified-header h3{font-size:21px}#reviews.zt-reviews-wrapper .zt-commentlist .comment_container{grid-template-columns:36px minmax(0,1fr);gap:10px}#reviews.zt-reviews-wrapper #comments .zt-commentlist .comment_container>img.avatar{width:36px;height:36px}.zt-reviews-wrapper .zt-reviews-title{font-size:18px!important}.zt-reviews-wrapper .zt-upload-btn{white-space:normal}}
