/* Styles cho phần Public (Frontend) của plugin */

/* Container chính của các đánh giá */
.gbr-reviews-container {
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Các kiểu bố cục */
.gbr-reviews-container.gbr-layout-list .gbr-review-item {
    border-bottom: 1px solid #eaeaea;
    padding: 15px 0;
}

.gbr-reviews-container.gbr-layout-list .gbr-review-item:last-child {
    border-bottom: none;
}

.gbr-reviews-container.gbr-layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.gbr-reviews-container.gbr-layout-grid .gbr-review-item {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

/* Kiểu cho từng mục đánh giá */
.gbr-review-item {
    margin-bottom: 10px;
}

.gbr-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap; /* Cho phép xuống dòng trên màn hình nhỏ */
}

.gbr-author-info {
    display: flex;
    align-items: center;
}

.gbr-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

.gbr-author-name {
    font-weight: bold;
    color: #333;
}

.gbr-author-name a {
    text-decoration: none;
    color: inherit;
}

.gbr-rating-stars .dashicons {
    color: #ffb900; /* Màu vàng sao */
    font-size: 18px;
    height: 18px;
    width: 18px;
    vertical-align: middle;
}

.gbr-review-content p {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    margin: 0 0 10px 0;
}

.gbr-review-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #777;
    margin-top: auto; /* Đẩy footer xuống dưới cùng trong layout grid */
}

.gbr-review-source .dashicons {
    font-size: 16px;
    height: 16px;
    width: 16px;
    vertical-align: middle;
    margin-right: 3px;
}

/* Nút "Write a review" */
.gbr-write-review {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eaeaea;
}

.gbr-write-review-button {
    display: inline-flex;
    align-items: center;
    background-color: #4285F4; /* Màu xanh của Google */
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.gbr-write-review-button:hover {
    background-color: #357ae8;
    color: #fff; /* Giữ màu chữ trắng khi hover */
}

.gbr-write-review-button .dashicons {
    font-size: 20px;
    height: 20px;
    width: 20px;
    margin-right: 8px;
    color: #fff; /* Đảm bảo màu icon trắng */
}

/* Khi không có reviews để hiển thị */
.gbr-no-reviews {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #888;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gbr-reviews-container.gbr-layout-grid {
        grid-template-columns: 1fr; /* Stack columns on smaller screens */
    }
}

@media (max-width: 480px) {
    .gbr-review-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .gbr-rating-stars {
        margin-top: 5px;
    }
    .gbr-author-avatar {
        margin-right: 5px;
    }
}