/* Customer Reviews Plugin Styles - Complete CSS */
.customer-reviews-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

/* Reviews Grid Layout */
.reviews-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Reviews List */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.review-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.review-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #10b981, #f59e0b);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.review-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.review-card:hover::before {
    opacity: 1;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.customer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.customer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.customer-avatar::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.review-card:hover .customer-avatar::after {
    opacity: 0.3;
}

.customer-details {
    flex: 1;
}

.customer-name {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
    text-decoration: none;
}

.customer-location {
    margin: 0.25rem 0 0 0;
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 400;
}

.review-meta {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.rating {
    display: flex;
    gap: 2px;
    margin-bottom: 0.5rem;
    justify-content: flex-end;
}

.star {
    color: #d1d5db;
    font-size: 1rem;
    transition: color 0.2s, transform 0.2s;
    cursor: default;
}

.star.active {
    color: #fbbf24;
    transform: scale(1.1);
}

.review-date {
    margin: 0;
    color: #9ca3af;
    font-size: 0.8rem;
    font-weight: 500;
}

.review-category {
    margin-bottom: 1rem;
}

.category-tag {
    display: inline-block;
    background: #dbeafe;
    color: #1e40af;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(30, 64, 175, 0.2);
    transition: all 0.2s ease;
}

.category-tag:hover {
    background: #bfdbfe;
    transform: translateY(-1px);
}

.review-content {
    position: relative;
}

.review-content p {
    margin: 0;
    line-height: 1.6;
    color: #374151;
    font-size: 0.95rem;
}

/* Review Form Container */
.review-form-container {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.review-form-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}

.review-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #10b981);
}

.form-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.form-icon {
    font-size: 1.5rem;
    filter: grayscale(0);
    transition: filter 0.3s ease;
}

.review-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s ease;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.form-group.focused label {
    color: #3b82f6;
    font-weight: 600;
}

.form-group.has-value label {
    font-size: 0.8rem;
    transform: translateY(-0.2rem);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
    background-color: #ffffff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: #fbfcff;
}

.form-group input.error,
.form-group textarea.error,
.form-group select.error {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
    background-color: #fef2f2;
}

/* Rating Input Styles */
.rating-input {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
}

.rating-input input[type="radio"] {
    display: none;
}

.star-label {
    cursor: pointer;
    color: #d1d5db;
    font-size: 1.5rem;
    transition: color 0.2s, transform 0.2s;
    margin: 0 !important;
    padding: 0.25rem;
    border-radius: 4px;
}

.star-label:hover {
    color: #fbbf24;
    transform: scale(1.1);
}

.rating-input input[type="radio"]:checked ~ .star-label,
.rating-input input[type="radio"]:checked + .star-label {
    color: #fbbf24;
    transform: scale(1.05);
}

/* Submit Button */
.submit-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-icon {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.submit-btn:hover .btn-icon {
    transform: translateX(2px);
}

/* Character Counter */
.char-counter {
    font-size: 0.75rem;
    color: #6b7280;
    text-align: right;
    margin-top: 0.25rem;
    transition: color 0.3s ease;
}

.char-counter.over-limit {
    color: #dc2626;
    font-weight: 600;
}

/* Message Styles */
.message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

.success-message {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.error-message {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Statistics Section */
.statistics-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.statistics-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.stats-title {
    font-size: 2rem;
    font-weight: bold;
    color: #111827;
    margin: 0 0 1rem 0;
    position: relative;
    z-index: 1;
}

.stats-description {
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto 2rem auto;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.stat-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:nth-child(1)::before {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

.stat-card:nth-child(2)::before {
    background: linear-gradient(90deg, #10b981, #047857);
}

.stat-card:nth-child(3)::before {
    background: linear-gradient(90deg, #8b5cf6, #6d28d9);
}

.stat-card:nth-child(4)::before {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-number {
    transform: scale(1.05);
}

.stat-card:nth-child(1) .stat-number { color: #3b82f6; }
.stat-card:nth-child(2) .stat-number { color: #10b981; }
.stat-card:nth-child(3) .stat-number { color: #8b5cf6; }
.stat-card:nth-child(4) .stat-number { color: #f59e0b; }

.stat-label {
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading-spinner {
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Admin Dashboard Styles */
.admin-stats {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.stat-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-width: 150px;
    text-align: center;
    flex: 1;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-box.pending { 
    border-left: 4px solid #ffc107; 
}

.stat-box.approved { 
    border-left: 4px solid #28a745; 
}

.stat-box.trashed { 
    border-left: 4px solid #dc3545; 
}

.stat-number { 
    font-size: 24px; 
    font-weight: bold; 
    margin: 10px 0; 
}

.stat-percentage { 
    color: #666; 
    font-size: 14px; 
}

.status-pending { 
    color: #ffc107; 
    font-weight: bold;
    background: #fff3cd;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.status-approved { 
    color: #28a745; 
    font-weight: bold;
    background: #d4edda;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.status-trashed { 
    color: #dc3545; 
    font-weight: bold;
    background: #f8d7da;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* Admin Action Buttons */
.approve-btn {
    background: #28a745;
    color: white;
    border: none;
    margin-right: 5px;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.approve-btn:hover {
    background: #218838;
    color: white;
    transform: translateY(-1px);
}

.trash-btn {
    background: #dc3545;
    color: white;
    border: none;
    margin-right: 5px;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.trash-btn:hover {
    background: #c82333;
    color: white;
    transform: translateY(-1px);
}

.restore-btn {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.restore-btn:hover {
    background: #138496;
    color: white;
    transform: translateY(-1px);
}

/* Admin Messages */
.admin-message {
    animation: slideDown 0.3s ease;
}

.notice-success {
    border-left-color: #28a745;
}

.notice-error {
    border-left-color: #dc3545;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .review-form-container {
        position: static;
    }
    
    .admin-stats {
        flex-direction: column;
    }
    
    .stat-box {
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .customer-reviews-container {
        padding: 1rem;
    }
    
    .review-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .review-meta {
        text-align: left;
        align-items: flex-start;
    }
    
    .rating {
        justify-content: flex-start;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stats-title {
        font-size: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .statistics-section {
        padding: 1.5rem;
    }
    
    .review-card {
        padding: 1rem;
    }
    
    .review-form-card {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .customer-info {
        gap: 0.75rem;
    }
    
    .customer-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .customer-name {
        font-size: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-title {
        font-size: 1.1rem;
    }
    
    .rating-input {
        justify-content: center;
    }
    
    .star-label {
        font-size: 1.25rem;
    }
}

/* Print Styles */
@media print {
    .review-form-container,
    .submit-btn,
    .admin-actions,
    .approve-btn,
    .trash-btn,
    .restore-btn {
        display: none !important;
    }
    
    .customer-reviews-container {
        box-shadow: none;
    }
    
    .review-card {
        border: 1px solid #ddd;
        box-shadow: none;
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .statistics-section {
        background: #f5f5f5;
        border: 1px solid #ddd;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .customer-reviews-container {
        background-color: #1a1a1a;
        color: #e5e5e5;
    }
    
    .review-card {
        background: #2d2d2d;
        border-color: #404040;
    }
    
    .customer-name {
        color: #ffffff;
    }
    
    .customer-location {
        color: #a0a0a0;
    }
    
    .review-content p {
        color: #d1d1d1;
    }
    
    .review-form-card {
        background: #2d2d2d;
        border-color: #404040;
    }
    
    .form-group label {
        color: #d1d1d1;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        background-color: #1a1a1a;
        border-color: #404040;
        color: #e5e5e5;
    }
    
    .statistics-section {
        background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    }
    
    .stats-title {
        color: #ffffff;
    }
    
    .stat-card {
        background: rgba(45, 45, 45, 0.9);
        border-color: #404040;
    }
}

/* Accessibility Improvements */
.review-card:focus-within,
.review-form-card:focus-within {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.submit-btn:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.star-label:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection styles */
::selection {
    background-color: #3b82f6;
    color: white;
}

::-moz-selection {
    background-color: #3b82f6;
    color: white;
}