/* 
 * NexWooReviews Frontend CSS 
 */

.nwr-reviews-wrapper {
    margin-top: 2em;
    width: 100% !important;
    max-width: none !important;
    clear: both !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    display: block !important;
}

#tab-description .nwr-reviews-wrapper,
#tab-description .nwr-all-reviews-wrapper,
.wc-tab:not(#tab-reviews) .nwr-reviews-wrapper,
.wc-tab:not(#tab-reviews) .nwr-all-reviews-wrapper,
div[id^="tab-"]:not(#tab-reviews) .nwr-reviews-wrapper,
div[id^="tab-"]:not(#tab-reviews) .nwr-all-reviews-wrapper {
    display: none !important;
}

.nwr-reviews-container {
    width: 100% !important;
    display: block !important;
    max-width: none !important;
}

.woocommerce div.product .woocommerce-tabs .panel#tab-reviews {
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
    display: block !important;
}

.woocommerce #reviews.nwr-reviews-wrapper,
.woocommerce #reviews.nwr-reviews-wrapper #comments,
.nwr-reviews-wrapper #comments {
    width: 100% !important;
    float: none !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ----------------------------------------------------
 * Summary Box Styling
 * ---------------------------------------------------- */
.nwr-summary-box {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    width: 100% !important;
    max-width: 600px !important;
    box-sizing: border-box !important;
    display: block !important;
    margin-left: 0 !important;
    margin-right: auto !important;
}

.nwr-summary-title {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    text-align: left;
}

.nwr-summary-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 40px;
    align-items: center;
    justify-content: flex-start;
    width: 100% !important;
}

.nwr-summary-left {
    flex: 0 0 30% !important;
    min-width: 200px !important;
    text-align: center;
    padding: 20px;
    background: transparent !important;
}

.nwr-summary-overall {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.nwr-summary-score {
    font-size: 56px;
    font-weight: 800;
    line-height: 1;
    color: #111827;
    margin-bottom: 5px;
}

.nwr-summary-out-of {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 10px;
}

.nwr-summary-stars {
    font-size: 20px;
    color: #f59e0b;
    margin-bottom: 10px;
}

.nwr-summary-count {
    font-size: 14px;
    color: #6b7280;
}

.nwr-summary-bars {
    flex: 1 1 auto !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nwr-bar-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nwr-bar-label {
    width: 50px;
    font-size: 14px;
    color: #374151;
    font-weight: 500;
    text-align: right;
}

.nwr-bar-track {
    flex: 1;
    height: 10px;
    background: #e5e7eb;
    border-radius: 5px;
    overflow: hidden;
}

.nwr-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 5px;
    transition: width 1s ease-out;
}

.nwr-bar-percent {
    width: 45px;
    font-size: 14px;
    color: #6b7280;
    text-align: left;
}

.nwr-summary-footer {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #f3f4f6;
}

.nwr-calc-link {
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.nwr-calc-link:hover {
    color: #111827;
    text-decoration: underline;
}

.nwr-layout-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

.nwr-review-card {
    background: #ffffff;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.nwr-review-card:hover {
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05), 0 8px 10px -6px rgba(0,0,0,0.01);
    border-color: #e5e7eb;
    transform: translateY(-2px);
}

.nwr-review-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 8px;
}

.nwr-review-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 2px solid #ffffff;
}

.nwr-review-meta {
    flex: 1;
}

.nwr-review-author {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.nwr-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #047857;
    background: #d1fae5;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: 0.2px;
    transition: background 0.2s ease;
}

.nwr-verified-badge:hover {
    background: #a7f3d0;
}

.nwr-review-rating {
    color: #f59e0b;
    font-size: 15px;
    letter-spacing: 2px;
    margin: 6px 0;
}

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

.nwr-star-half {
    color: #f59e0b;
    position: relative;
}

.nwr-star-empty {
    color: #e5e7eb;
}

.nwr-review-date {
    font-size: 13px;
    color: #9ca3af;
    font-weight: 500;
    margin-left: 6px;
}

.nwr-review-title {
    margin: 0 0 10px 0;
    font-size: 1.15em;
    font-weight: 700;
    color: #111827;
}

/* Helpful Buttons */
.nwr-helpful-buttons {
    margin-top: 20px;
    font-size: 14px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.nwr-helpful-btn {
    background: transparent;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    padding: 6px 16px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nwr-helpful-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #111827;
    transform: translateY(-1px);
}

.nwr-helpful-btn:active {
    transform: translateY(0);
}

.nwr-review-content {
    color: #374151;
    line-height: 1.6;
    font-size: 15px;
}

.nwr-review-content p {
    margin-bottom: 10px;
}

.nwr-review-content p:last-child {
    margin-bottom: 0;
}

.nwr-review-media {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.nwr-review-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: zoom-in;
    border: 1px solid #e5e7eb;
}

.nwr-pagination {
    margin-top: 24px;
    text-align: center;
}

.nwr-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nwr-pagination .page-numbers:hover {
    background: #f3f4f6;
}

.nwr-pagination .page-numbers.current {
    background: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
}

/* Lightbox */
.nwr-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    cursor: pointer;
}

.nwr-lightbox-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.nwr-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    line-height: 1;
}

.nwr-no-reviews {
    padding: 20px;
    text-align: center;
    color: #6b7280;
    font-style: italic;
}

/* Grid Layout */
.nwr-layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.nwr-grid-card {
    display: flex;
    flex-direction: column;
}

.nwr-grid-card .nwr-review-content {
    flex-grow: 1;
}

.nwr-review-product-info {
    margin-bottom: 16px;
}

.nwr-product-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.nwr-product-link:hover {
    opacity: 0.8;
}

.nwr-product-thumb {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.nwr-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nwr-product-details {
    display: flex;
    flex-direction: column;
}

.nwr-product-title {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
    margin-bottom: 4px;
}

.nwr-view-product {
    font-size: 12px;
    color: #4f46e5;
    font-weight: 500;
}

.nwr-card-divider {
    border: 0;
    height: 1px;
    background: #e5e7eb;
    margin: 0 0 16px 0;
}

.nwr-review-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

/* Customer Reviews Summary Box */
.nwr-summary-box {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    padding: 32px;
    max-width: 400px;
    margin: 0 auto 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.nwr-summary-title {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
    margin: 0 0 16px 0;
}

.nwr-summary-overall {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #f8fafc;
    padding: 10px 16px;
    border-radius: 30px;
    width: max-content;
    margin: 0 auto 12px auto;
}

.nwr-summary-stars {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nwr-summary-stars .nwr-star {
    font-size: 20px;
}

.nwr-summary-stars .nwr-star-full {
    color: #fcd34d;
}

.nwr-summary-stars .nwr-star-empty {
    color: #e2e8f0;
}

.nwr-summary-score {
    font-size: 13px;
    color: #475569;
    font-weight: 500;
}

.nwr-summary-count {
    text-align: center;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 24px;
}

.nwr-summary-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.nwr-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nwr-bar-label {
    width: 45px;
    font-size: 13px;
    color: #3b82f6;
    text-align: right;
    text-decoration: none;
}

.nwr-bar-label:hover {
    text-decoration: underline;
    cursor: pointer;
}

.nwr-bar-track {
    flex: 1;
    height: 10px;
    background: #f1f5f9;
    border-radius: 5px;
    overflow: hidden;
}

.nwr-bar-fill {
    height: 100%;
    background: #fcd34d;
    border-radius: 5px;
    transition: width 0.5s ease-out;
}

.nwr-bar-percent {
    width: 35px;
    font-size: 13px;
    color: #475569;
    text-align: left;
}

.nwr-summary-footer {
    text-align: center;
}

.nwr-calc-link {
    font-size: 12px;
    color: #3b82f6;
    text-decoration: none;
}

.nwr-calc-link:hover {
    text-decoration: underline;
}
