/** PREMIUM REVIEW LIST STYLES **/
#ai-product-reviews {
    margin-top: 30px;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
}

.ai-review-item {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #eee;
}

.ai-review-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.ai-review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.ai-review-author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Avatar Placeholder */
.ai-review-avatar {
    width: 40px;
    height: 40px;
    background: #e9ecef;
    color: #6c757d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
}

.ai-review-meta {
    display: flex;
    flex-direction: column;
}

.ai-review-author-name {
    font-weight: 700;
    color: #333;
    font-size: 1rem;
}

.ai-review-date {
    font-size: 0.8rem;
    color: #999;
}

.ai-badges {
    display: flex;
    gap: 5px;
    margin-top: 2px;
}

.is-ai-badge,
.verified-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.is-ai-badge {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.verified-badge {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.ai-review-body {
    margin-top: 10px;
    padding-left: 52px;
    /* Align with text start (40px avatar + 12px gap) */
}

.ai-review-rating {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.ai-review-rating i {
    font-size: 16px;
    color: #ffc107;
    margin-right: 1px;
}

.ai-review-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: #222;
    margin-bottom: 5px;
    display: block;
}

.ai-review-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
}

@media (max-width: 576px) {
    .ai-review-body {
        padding-left: 0;
    }

    .ai-review-item {
        padding: 15px;
    }
}

/** DASHBOARD / AGGREGATE **/
.ai-summary-row {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.ai-grade-card {
    display: flex;
    align-items: center;
}

.ai-grade-main {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ai-grade-big {
    font-size: 3.5rem;
    font-weight: 900;
    color: #2eacce;
    line-height: 1;
}

.ai-grade-stars-wrap {
    display: flex;
    flex-direction: column;
}

.ai-stars-gold i {
    color: #ffc107;
    font-size: 24px;
}

.ai-btn-write {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    padding: 12px 30px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.ai-btn-write:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.custom-headings {
    margin: 40px 0 25px;
    font-weight: 800;
    font-size: 1.8rem;
    color: #222;
    position: relative;
    padding-bottom: 15px;
}

.custom-headings::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: #2eacce;
    border-radius: 2px;
}

/** NEW STYLES FOR MODAL **/

/* Interactive Stars */
.ai-star-rating {
    display: inline-block;
    direction: ltr;
    /* Ensure left-to-right */
}

.ai-star-rating i {
    font-size: 24px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.ai-star-rating i.active,
.ai-star-rating i.hover {
    color: #ffc107;
    /* Gold/Orange */
}

/* Modal Layout */
#ai-post-review-modal {
    z-index: 10000 !important;
}

#ai-post-review-modal .modal-dialog {
    margin-top: 10vh; /* Move it down from the top */
}

#ai-post-review-modal .modal-content {
    border-radius: 8px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#ai-post-review-modal .modal-header {
    border-bottom: none;
    text-transform: uppercase;
    font-weight: bold;
    padding: 20px 20px 5px;
}

#ai-post-review-modal .modal-title {
    font-weight: 700;
    font-size: 1.2rem;
}

#ai-post-review-modal .modal-body {
    padding: 20px;
}

/* Product Summary in Modal */
.ai-modal-product-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.ai-modal-product-image img {
    width: 80px;
    height: auto;
    border: 1px solid #eee;
}

.ai-modal-product-info {
    flex: 1;
}

.ai-modal-product-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.ai-modal-desc {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
}

/* Inputs */
#ai-post-review-modal .form-group label {
    font-weight: normal;
    color: #333;
    margin-bottom: 5px;
}

#ai-post-review-modal .form-control {
    border-radius: 0;
    border: 1px solid #ccc;
    box-shadow: none;
}

#ai-post-review-modal .form-control:focus {
    border-color: #666;
}

/* Star Widget container in layout */
.ai-rating-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-rating-label {
    font-weight: bold;
    font-size: 0.9rem;
}

/* Footer & Buttons */
#ai-post-review-modal .modal-footer {
    border-top: 1px solid #eee;
    padding: 15px 20px;
}

.btn-outline-secondary {
    background: #fff;
    border: 1px solid #ccc;
    color: #333;
    transition: all 0.2s;
}

.btn-outline-secondary:hover {
    background: #f1f1f1;
}

.btn-primary-custom {
    background-color: #5c7c89;
    /* The teal-ish color from screenshot */
    color: #fff;
    border: none;
    border-radius: 2px;
}

.btn-primary-custom:hover {
    background-color: #4a6570;
    color: #fff;
}