/* SEC Review Manager — Frontend (Divi + WooCommerce compatible) */

.secrm-controls {
    margin-bottom: 1.5em;
}

.secrm-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5em;
    margin-bottom: 1em;
    padding: 0.75em 1em;
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.secrm-filter-label {
    font-weight: 600;
    margin-right: 0.25em;
    color: #334155;
}

.secrm-filter {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 0.35em 0.75em;
    cursor: pointer;
    font-size: 0.875em;
    transition: background 0.15s, border-color 0.15s;
}

.secrm-filter:hover,
.secrm-filter:focus {
    border-color: #64748b;
    outline: none;
}

.secrm-filter.active {
    background: #1e3a5f;
    border-color: #1e3a5f;
    color: #fff;
}

.secrm-reviews-enabled.secrm-enhanced #reviews #comments > .commentlist {
    display: none;
}

.secrm-review-list {
    display: flex;
    flex-direction: column;
    gap: 1.25em;
}

.secrm-review-item {
    padding: 1em 0;
    border-bottom: 1px solid #e2e8f0;
}

.secrm-review-item .comment_container {
    display: flex;
    gap: 1em;
}

.secrm-review-item .comment-text {
    flex: 1;
    min-width: 0;
}

.secrm-review-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5em 0.75em;
    margin: 0.35em 0 0.75em;
    font-size: 0.875em;
}

.secrm-stars {
    display: inline-flex;
    gap: 1px;
    color: #cbd5e1;
}

.secrm-star.filled {
    color: #f59e0b;
}

.secrm-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    border-radius: 4px;
    padding: 0.15em 0.5em;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.secrm-verified-icon {
    flex-shrink: 0;
}

.secrm-review-date {
    color: #64748b;
}

.secrm-review-text {
    line-height: 1.6;
    color: #334155;
}

.secrm-review-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75em;
    margin: 0.75em 0;
}

.secrm-photo-item {
    margin: 0;
    text-align: center;
    max-width: 120px;
}

.secrm-photo-item img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    object-fit: cover;
    aspect-ratio: 1;
}

.secrm-photo-item figcaption {
    font-size: 0.7em;
    color: #64748b;
    margin-top: 0.25em;
}

.secrm-review-actions {
    margin-top: 0.75em;
}

.secrm-helpful-btn {
    background: transparent;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 0.35em 0.75em;
    cursor: pointer;
    font-size: 0.875em;
    color: #475569;
    transition: background 0.15s;
}

.secrm-helpful-btn:hover:not(:disabled) {
    background: #f1f5f9;
}

.secrm-helpful-btn.secrm-voted,
.secrm-helpful-btn:disabled {
    opacity: 0.65;
    cursor: default;
}

.secrm-seller-response {
    margin-top: 1em;
    padding: 0.75em 1em;
    background: #f8fafc;
    border-left: 3px solid #1e3a5f;
    border-radius: 0 4px 4px 0;
}

.secrm-seller-label {
    display: block;
    margin-bottom: 0.35em;
    color: #1e3a5f;
}

.secrm-seller-date {
    display: block;
    font-size: 0.8em;
    color: #64748b;
    margin-top: 0.5em;
}

.secrm-pagination-wrap {
    text-align: center;
    margin: 1.5em 0;
}

.secrm-load-more {
    min-width: 200px;
}

.secrm-loading {
    text-align: center;
    padding: 2em;
    color: #64748b;
}

.secrm-verified-notice {
    padding: 0.75em 1em;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 4px;
    margin-bottom: 1em;
}

.secrm-verified-notice.secrm-warning {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #92400e;
}

.secrm-photo-uploads {
    margin: 1em 0;
    padding: 1em;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
}

.secrm-photo-field {
    margin-bottom: 0.75em;
}

.secrm-photo-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25em;
    font-size: 0.875em;
}

.secrm-photo-input {
    width: 100%;
    max-width: 400px;
}

.secrm-hp {
    position: absolute !important;
    left: -9999px !important;
    height: 0 !important;
    overflow: hidden !important;
}

@media (max-width: 767px) {
    .secrm-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .secrm-filter {
        width: 100%;
        text-align: center;
    }

    .secrm-review-item .comment_container {
        flex-direction: column;
    }

    .secrm-review-photos {
        justify-content: center;
    }
}

/* Divi module compatibility */
.et_pb_wc_reviews .secrm-controls,
.et_pb_wc_tabs .secrm-controls {
    width: 100%;
}

.woocommerce #reviews .secrm-review-item .meta {
    margin-bottom: 0;
}
