/* Testimonial Ratings */
.testimonial-ratings {
    font-family: system-ui, -apple-system, sans-serif;
    margin: 1rem 0;
    padding: 1rem;
    background-color: #f9fafb;
    border-radius: 0.75rem;
}

.testimonial-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    background-color: white;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.testimonial-content {
    flex: 1;
}

.testimonial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.testimonial-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.testimonial-name {
    font-weight: 600;
    color: #374151;
}

.testimonial-date {
    color: #6b7280;
    font-size: 0.875rem;
}

.testimonial-date::before {
    content: '•';
    color: #9ca3af;
    margin: 0 0.5rem;
}

.testimonial-stars {
    display: flex;
    gap: 0.25rem;
}

.testimonial-stars .star {
    font-size: 1.5rem;
    color: #d1d5db;
    line-height: 1;
}

.testimonial-stars .star.active {
    color: #fbbf24;
}

.testimonial-comment {
    color: #4b5563;
    line-height: 1.5;
    margin-top: 0.5rem;
    max-height: 3em;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    position: relative;
}

.testimonial-comment.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2em;
    background: linear-gradient(transparent, white);
}

.testimonial-comment:not(.collapsed) {
    max-height: none;
}

.toggle-comment {
    color: #3b82f6;
    cursor: pointer;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: inline-block;
}

.toggle-comment:hover {
    text-decoration: underline;
}

/* Testimonial Images */
.testimonial-images {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.testimonial-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: transform 0.2s ease;
    border: 2px solid #e5e7eb;
}

.testimonial-image:hover {
    transform: scale(1.05);
    border-color: #3b82f6;
}

/* Image Modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0.5rem;
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.image-modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Testimonial Form */
.testimonial-form {
    font-family: system-ui, -apple-system, sans-serif;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background-color: white;
    margin-top: 2rem;
}

.testimonial-form .form-group {
    margin-bottom: 1rem;
}

.testimonial-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.testimonial-form input[type="text"],
.testimonial-form input[type="email"],
.testimonial-form textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.testimonial-form input[type="file"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background-color: white;
}

.testimonial-form .rating-stars {
    display: flex;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.testimonial-form .rating-star {
    font-size: 2rem;
    cursor: pointer;
    color: #d1d5db;
    transition: color 0.2s;
}

.testimonial-form .rating-star.active {
    color: #fbbf24;
}

.testimonial-form button {
    padding: 0.5rem 1rem;
    background-color: var(--rating-color, #3B82F6);
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.testimonial-form button:hover {
    background-color: var(--rating-color-hover, #2563eb);
}

.testimonial-form .error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.testimonial-form .success {
    color: #059669;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Image Preview */
.image-preview {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.image-preview-item {
    position: relative;
    display: inline-block;
}

.image-preview-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 0.375rem;
    border: 2px solid #e5e7eb;
}

.remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.remove-image:hover {
    background: #b91c1c;
}

/* Pagination styles */
.testimonial-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination-button {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.pagination-button:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
}

.pagination-button.active {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.pagination-ellipsis {
    padding: 0.5rem;
    color: #6b7280;
}

.export-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: flex-end;
}

.export-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #10b981;
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
}

.export-button:hover {
    background-color: #059669;
}

.export-button svg {
    width: 1rem;
    height: 1rem;
}

.alert {
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.testimonial-summary {
    background-color: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.testimonial-summary-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.testimonial-summary-text {
    flex: 1;
}

.testimonial-summary-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.testimonial-summary-rating {
    font-size: 1.125rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.testimonial-summary-count {
    color: #6b7280;
    font-size: 0.875rem;
}

.testimonial-summary-stars {
    display: flex;
    gap: 0.25rem;
}

.testimonial-summary-stars .star {
    font-size: 1.5rem;
    color: #d1d5db;
    line-height: 1;
}

.testimonial-summary-stars .star.active {
    color: #fbbf24;
}

.testimonial-disclaimer {
    margin-top: 2rem;
    padding: 1rem;
    background-color: #f3f4f6;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.5;
}

.testimonial-disclaimer p {
    margin: 0;
}

.testimonial-disclaimer b {
    color: #374151;
}
