/* 
 * Rating Fetcher Plugin - Modern Enterprise Styles 
 * Color Palette:
 * Primary: #0d6efd (Blue)
 * Background: #f8f9fa (Light Gray)
 * Surface: #ffffff (White)
 * Text: #212529 (Dark)
 * Border: #dee2e6
 */

.frating-plugin-wrapper {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #212529;
    background-color: transparent;
    max-width: 1200px;
    margin: 0 auto;
    direction: rtl;
    line-height: 1.6;
}

/* Header & Summary Section */
.frating-header {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid #eaeaea;
}

.frating-summary-container {
    text-align: center;
    margin-bottom: 20px;
}

.rating-overall-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.rating-overall-score .rating-value {
    font-size: 3rem;
    font-weight: 800;
    color: #0d6efd;
    line-height: 1;
}

.rating-overall-score .rating-count {
    font-size: 1rem;
    color: #6c757d;
    margin-top: 8px;
    font-weight: 500;
}

/* Category Filters (Pills) */
.frating-category-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eaeaea;
}

.frating-rating-filter {
    cursor: pointer;
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    border-radius: 50px;
    background-color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    gap: 6px;
}

.frating-rating-filter:hover {
    background-color: #f8f9fa;
    border-color: #ced4da;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.frating-rating-filter.selected {
    background-color: #0d6efd;
    color: #ffffff;
    border-color: #0d6efd;
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.2);
}

.frating-rating-filter .stars {
    letter-spacing: 2px;
}

/* Title & Dropdown */
.frating-filters-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.frating-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #343a40;
}

.dropdown-wrapper label {
    font-weight: 500;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 10px;
}

.frating-select {
    padding: 10px 16px;
    font-size: 14px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background-color: #f8f9fa;
    color: #212529;
    min-width: 250px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23495057%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: left 12px top 50%;
    background-size: 12px auto;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    cursor: pointer;
}

.frating-select:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Table Styles */
.frating-table-wrapper {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid #eaeaea;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 24px;
}

.frating-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
    min-width: 900px;
}

.frating-table th, 
.frating-table td {
    padding: 16px 20px;
    font-size: 14.5px;
    border-bottom: 1px solid #f1f3f5;
    vertical-align: middle;
}

.frating-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.frating-table tbody tr {
    transition: background-color 0.15s ease-in-out;
}

.frating-table tbody tr:hover {
    background-color: #f8f9fa;
}

.frating-table tbody tr:last-child td {
    border-bottom: none;
}

/* Pagination */
.frating-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.frating-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #0d6efd;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.frating-page-btn:hover:not(.active) {
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: #0a58ca;
}

.frating-page-btn.active {
    background-color: #0d6efd;
    color: #ffffff;
    border-color: #0d6efd;
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.2);
}

.frating-dots {
    color: #6c757d;
    padding: 0 4px;
}

/* Loading & Empty States */
.loading-state, 
.empty-state, 
.error-state {
    text-align: center;
    padding: 40px !important;
    color: #6c757d;
    font-size: 1.1rem;
}

.frating-loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0d6efd;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: frating-spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-left: 10px;
}

@keyframes frating-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .frating-filters-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .dropdown-wrapper label {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .frating-select {
        width: 100%;
        min-width: 100%;
    }

    .frating-category-container {
        gap: 8px;
    }

    .frating-rating-filter {
        padding: 6px 12px;
        font-size: 13px;
    }
}