/**
 * IJ Review Widget - Styles
 *
 * @package IJ_Review_Widget
 */

/* Common styles */
.ij-review-widget-wrapper {
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.5;
}

/* Review Submit Form Styles */
.ij-review-submit-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 0;
}

.ij-review-submit-heading {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.ij-review-submit-form {
    background-color: #f8f8f8;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.ij-review-submit-response {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 4px;
    display: none;
}

.ij-review-submit-response.ij-success {
    background-color: #e7f7ee;
    color: #0c6e32;
    border: 1px solid #c3e6d1;
    display: block;
}

.ij-review-submit-response.ij-error {
    background-color: #ffeef0;
    color: #d63638;
    border: 1px solid #f7c7c7;
    display: block;
}

.ij-review-submit-field {
    margin-bottom: 20px;
}

.ij-review-submit-field label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
}

.ij-review-submit-field input[type="text"],
.ij-review-submit-field select,
.ij-review-submit-field textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #fff;
    font-size: 16px;
    line-height: 1.4;
}

.ij-review-submit-field textarea {
    min-height: 100px;
    resize: vertical;
}

.ij-review-submit-field input[type="file"] {
    padding: 8px 0;
}

.ij-review-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 5px;
}

.ij-review-checkbox-item {
    display: flex;
    align-items: center;
}

.ij-review-checkbox-item input[type="checkbox"] {
    margin-right: 8px;
}

.ij-review-other-condition {
    grid-column: 1 / -1;
    margin-top: 10px;
}

/* Replace the star rating CSS section with this */
/* Star Rating */
.ij-star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    font-size: 28px;
}

.ij-star-rating input[type="radio"] {
    display: none;
}

.ij-star-rating label.ij-star {
    color: #ddd;
    cursor: pointer;
    padding: 0 2px;
    transition: color 0.2s ease;
}

.ij-star-rating label.ij-star:hover,
.ij-star-rating label.ij-star:hover ~ label.ij-star,
.ij-star-rating input[type="radio"]:checked ~ label.ij-star {
    color: #f8b500;
}

.ij-star-rating label.ij-star.selected {
    color: #f8b500;
}

.ij-review-submit-button {
    background-color: #2271b1;
    color: #fff;
    padding: 12px 24px;
    border-radius: 4px;
    border: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.ij-review-submit-button:hover {
    background-color: #135e96;
}

.ij-review-submit-button:disabled {
    background-color: #6c7781;
    cursor: not-allowed;
}

.ij-review-submit-button-field {
    text-align: center;
    margin-top: 30px;
}

.ij-validation-error {
    color: #d63638;
    font-size: 14px;
    margin-top: 5px;
}

.ij-review-submit-field .required {
    color: #d63638;
}

.ij-review-submit-login-required {
    text-align: center;
    padding: 30px;
    background-color: #f8f8f8;
    border-radius: 8px;
}

.ij-review-login-button {
    display: inline-block;
    background-color: #2271b1;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    margin-top: 15px;
    text-decoration: none;
    font-weight: 500;
}

.ij-review-submit-error {
    padding: 15px;
    background-color: #ffeef0;
    color: #d63638;
    border: 1px solid #f7c7c7;
    border-radius: 4px;
}

/* Review Display Styles */
.ij-review-display-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
    position: relative;
}

.ij-review-display-error {
    padding: 15px;
    background-color: #ffeef0;
    color: #d63638;
    border: 1px solid #f7c7c7;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Review Filters */
.ij-review-filters {
    background-color: #f8f8f8;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.ij-review-filter-heading {
    font-size: 18px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 12px;
}

.ij-review-filter-section {
    margin-bottom: 20px;
}

.ij-review-filter-section:last-child {
    margin-bottom: 0;
}

.ij-review-filter-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.ij-review-filter-item {
    display: flex;
    align-items: center;
}

.ij-review-filter-item input[type="checkbox"] {
    margin-right: 8px;
}

.ij-review-filter-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    gap: 10px;
}

.ij-review-filter-apply-btn,
.ij-review-filter-reset-btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
}

.ij-review-filter-apply-btn {
    background-color: #2271b1;
    color: #fff;
}

.ij-review-filter-reset-btn {
    background-color: #f0f0f0;
    color: #333;
}

.ij-review-filter-apply-btn:hover {
    background-color: #135e96;
}

.ij-review-filter-reset-btn:hover {
    background-color: #e0e0e0;
}

/* Review List */
.ij-review-list {
    margin-bottom: 30px;
}

.ij-review-item {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
}

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

.ij-review-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ij-review-name {
    font-weight: 600;
    font-size: 16px;
}

.ij-review-age {
    color: #666;
    font-size: 14px;
    position: relative;
    padding-left: 10px;
}

.ij-review-age::before {
    content: '•';
    position: absolute;
    left: 0;
}

.ij-review-date {
    color: #666;
    font-size: 14px;
    position: relative;
    padding-left: 10px;
}

.ij-review-date::before {
    content: '•';
    position: absolute;
    left: 0;
}

.ij-review-rating {
    display: flex;
}

.ij-review-rating .ij-star {
    color: #f8b500;
    font-size: 18px;
    margin-left: 2px;
}

.ij-review-rating .ij-star-empty {
    color: #ddd;
}

.ij-review-content {
    margin-bottom: 15px;
    line-height: 1.6;
}

.ij-review-tag-list {
    margin-bottom: 15px;
}

.ij-review-tag-heading {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.ij-review-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ij-review-tag {
    display: inline-block;
    background-color: #f0f0f0;
    color: #333;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 50px;
}

.ij-review-usage {
    margin-top: 15px;
    font-size: 14px;
    color: #666;
}

.ij-review-usage-label {
    font-weight: 600;
    margin-right: 5px;
}

.ij-review-photo {
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.ij-review-image {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Load More Button */
.ij-load-more-wrapper {
    text-align: center;
    margin-top: 30px;
}

.ij-load-more-button {
    background-color: #2271b1;
    color: #fff;
    padding: 12px 24px;
    border-radius: 4px;
    border: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.ij-load-more-button:hover {
    background-color: #135e96;
}

.ij-load-more-button:disabled {
    background-color: #6c7781;
    cursor: not-allowed;
}

.ij-review-empty-message {
    text-align: center;
    padding: 30px;
    background-color: #f8f8f8;
    border-radius: 8px;
    font-size: 16px;
    color: #666;
}

.ij-review-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.ij-review-loading-spinner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2271b1;
    animation: ij-spin 1s linear infinite;
}

@keyframes ij-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Styles */
@media screen and (max-width: 600px) {
    .ij-review-header {
        flex-direction: column;
    }
    
    .ij-review-rating {
        margin-top: 10px;
    }
    
    .ij-review-checklist {
        grid-template-columns: 1fr;
    }
    
    .ij-review-filter-items {
        grid-template-columns: 1fr;
    }
    
    .ij-review-filter-actions {
        flex-direction: column;
    }
    
    .ij-review-filter-apply-btn,
    .ij-review-filter-reset-btn {
        width: 100%;
        margin-bottom: 10px;
    }
}