/**
 * Frontend Styles for Medic Transport Reviews
 */

/* Base Styles */
.mtr-reviews-list,
.mtr-reviews-grid,
.mtr-reviews-carousel {
    margin: 00px 0;
    font-family: inherit;
}

.mtr-no-reviews {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* Review Item Styles */
.mtr-review-item,
.mtr-review-card {
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mtr-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.mtr-reviewer-name {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.mtr-review-rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

.mtr-review-content {
    margin-bottom: 15px;
}

.mtr-review-text {
    margin: 0;
    line-height: 1.6;
    color: #555;
}

.mtr-review-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #777;
}

.mtr-review-meta span {
    display: inline-block;
}

.mtr-review-date:before {
    content: "📅 ";
}

.mtr-review-source:before {
    content: "🌐 ";
}

.mtr-review-location:before {
    content: "📍 ";
}

.mtr-review-service:before {
    content: "🚑 ";
}

/* Star Rating Styles */
.mtr-stars {
    display: inline-flex;
    gap: 2px;
}

.mtr-star {
    font-size: 22px;
    line-height: 1;
}

.mtr-star-full {
    color: #ffc107;
}

.mtr-star-half {
    color: #ffc107;
    position: relative;
}

.mtr-star-half:after {
    content: "☆";
    position: absolute;
    left: 50%;
    color: #ddd;
}

.mtr-star-empty {
    color: #ddd;
}

.mtr-rating-value {
    margin-left: 8px;
    font-size: 14px;
    color: #666;
}

/* Grid Layout */
.mtr-reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.mtr-reviews-grid .mtr-review-card {
    margin-bottom: 0;
    height: fit-content;
}

.mtr-review-footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* Carousel Layout */
.mtr-reviews-carousel {
    position: relative;
    overflow: hidden;
}

.mtr-carousel-container {
    overflow: hidden;
    border-radius: 8px;
}

.mtr-carousel-track {
    display: flex;
    transition: transform 0.3s ease;
}

/* Single Carousel (Original) */
.mtr-carousel-single .mtr-carousel-slide {
    min-width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
}

/* Triple Carousel */
.mtr-carousel-triple .mtr-carousel-slide {
    min-width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
    display: flex;
    align-items: stretch;
}

.mtr-carousel-triple .mtr-carousel-slide-group {
    display: flex;
    gap: 20px;
    height: 100%;
}

.mtr-carousel-triple .mtr-review-card {
    flex: 1;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.mtr-carousel-triple .mtr-review-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mtr-carousel-triple .mtr-review-text {
    flex: 1;
}

.mtr-carousel-triple .mtr-review-footer {
    margin-top: auto;
}

.mtr-carousel-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.mtr-carousel-prev,
.mtr-carousel-next {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.mtr-carousel-prev:hover,
.mtr-carousel-next:hover {
    background: #005a87;
}

.mtr-carousel-prev:disabled,
.mtr-carousel-next:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Style Variations */

/* Minimal Style */
.mtr-style-minimal .mtr-review-item,
.mtr-style-minimal .mtr-review-card {
    border: none;
    box-shadow: none;
    border-bottom: 1px solid #eee;
    border-radius: 0;
    padding: 15px 0;
}

.mtr-style-minimal .mtr-review-item:last-child,
.mtr-style-minimal .mtr-review-card:last-child {
    border-bottom: none;
}

/* Card Style */
.mtr-style-card .mtr-review-item,
.mtr-style-card .mtr-review-card {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mtr-style-card .mtr-review-item:hover,
.mtr-style-card .mtr-review-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

/* Modern Style */
.mtr-style-modern .mtr-review-item,
.mtr-style-modern .mtr-review-card {
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
}

.mtr-style-modern .mtr-reviewer-name {
    color: #007cba;
}

.mtr-style-modern .mtr-review-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* Review Statistics */
.mtr-review-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.mtr-stat-item {
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.mtr-stat-label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.mtr-stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #007cba;
}

.mtr-rating-stars {
    margin-left: 10px;
}

/* Rating Distribution */
.mtr-rating-distribution {
    max-width: 300px;
}

.mtr-distribution-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.mtr-distribution-label {
    min-width: 60px;
    font-size: 14px;
}

.mtr-distribution-bar {
    flex: 1;
    height: 20px;
    background: #e1e1e1;
    border-radius: 10px;
    overflow: hidden;
}

.mtr-distribution-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffc107 0%, #ff9800 100%);
    transition: width 0.3s ease;
}

.mtr-distribution-count {
    min-width: 30px;
    text-align: right;
    font-size: 14px;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mtr-reviews-grid {
        grid-template-columns: 1fr;
    }
    
    .mtr-review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .mtr-review-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .mtr-review-stats {
        flex-direction: column;
        text-align: center;
    }
    
    .mtr-stat-item {
        min-width: auto;
    }
    
    .mtr-carousel-slide {
        padding: 0 5px;
    }
    
    /* Triple carousel responsive - show 2 reviews on tablet */
    .mtr-carousel-triple .mtr-carousel-slide-group {
        gap: 15px;
    }
    
    .mtr-carousel-triple .mtr-review-card {
        min-height: 250px;
    }
}

@media (max-width: 600px) {
    /* Triple carousel responsive - show 1 review on mobile */
    .mtr-carousel-triple,
    .mtr-carousel-triple *,
    .mtr-carousel-triple .mtr-carousel-container,
    .mtr-carousel-triple .mtr-carousel-track,
    .mtr-carousel-triple .mtr-carousel-slide,
    .mtr-carousel-triple .mtr-carousel-slide-group {
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
    }
    
    .mtr-carousel-triple .mtr-carousel-slide-group {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .mtr-carousel-triple .mtr-review-card {
        min-height: auto !important;
        height: auto !important;
        max-height: none !important;
        flex: none;
    }
}

@media (max-width: 480px) {
    .mtr-review-item,
    .mtr-review-card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .mtr-reviewer-name {
        font-size: 16px;
    }
    
    .mtr-review-stats {
        padding: 15px;
    }
    
    .mtr-stat-value {
        font-size: 20px;
    }
}

/* Loading States */
.mtr-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.mtr-loading:after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: mtr-spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes mtr-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error States */
.mtr-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #f5c6cb;
    margin: 20px 0;
}

/* Accessibility */
.mtr-carousel-prev:focus,
.mtr-carousel-next:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.mtr-review-item:focus-within,
.mtr-review-card:focus-within {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Detailed Ratings Styles */
.mtr-detailed-ratings {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.mtr-detailed-ratings-title {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
}

.mtr-rating-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.mtr-rating-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.mtr-rating-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-color: #007cba;
}

.mtr-rating-label {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    flex: 1;
    margin-right: 10px;
}

.mtr-rating-score {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.mtr-score-value {
    font-size: 18px;
    font-weight: 700;
    color: #007cba;
    line-height: 1;
}

.mtr-score-max {
    font-size: 14px;
    color: #6c757d;
    margin-left: 2px;
}

.mtr-rating-stars-small {
    transform: scale(0.8);
    transform-origin: right center;
}

.mtr-rating-stars-small .mtr-stars {
    gap: 1px;
}

.mtr-rating-stars-small .mtr-star {
    font-size: 14px;
}

/* Style variations for detailed ratings */
.mtr-style-minimal .mtr-detailed-ratings {
    background: transparent;
    border: none;
    padding: 15px 0;
}

.mtr-style-minimal .mtr-rating-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid #e9ecef;
    border-radius: 0;
    padding: 10px 0;
}

.mtr-style-minimal .mtr-rating-item:last-child {
    border-bottom: none;
}

.mtr-style-minimal .mtr-rating-item:hover {
    transform: none;
    box-shadow: none;
    background: #f8f9fa;
}

.mtr-style-card .mtr-detailed-ratings {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.mtr-style-card .mtr-rating-item {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mtr-style-card .mtr-rating-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.mtr-style-modern .mtr-detailed-ratings {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
    border-radius: 12px;
}

.mtr-style-modern .mtr-detailed-ratings-title {
    color: #007cba;
    border-bottom-color: #007cba;
}

.mtr-style-modern .mtr-rating-item {
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.mtr-style-modern .mtr-rating-item:hover {
    border-color: #007cba;
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
}

/* Responsive design for detailed ratings */
@media (max-width: 768px) {
    .mtr-rating-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .mtr-detailed-ratings {
        padding: 15px;
        margin-top: 15px;
    }
    
    .mtr-rating-item {
        padding: 10px 12px;
    }
    
    .mtr-rating-label {
        font-size: 13px;
    }
    
    .mtr-score-value {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .mtr-detailed-ratings {
        padding: 12px;
    }
    
    .mtr-detailed-ratings-title {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .mtr-rating-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px;
    }
    
    .mtr-rating-score {
        align-items: flex-start;
        flex-direction: row;
        gap: 8px;
    }
    
    .mtr-rating-stars-small {
        transform: scale(0.9);
        transform-origin: left center;
    }
}

/* Print Styles */
@media print {
    .mtr-carousel-controls {
        display: none;
    }
    
    .mtr-reviews-carousel .mtr-carousel-track {
        display: block;
    }
    
    .mtr-carousel-slide {
        min-width: auto;
        padding: 0;
        page-break-inside: avoid;
    }
    
    .mtr-review-item,
    .mtr-review-card {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
    
    .mtr-detailed-ratings {
        background: #fff;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
    
    .mtr-rating-item {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .mtr-pagination {
        display: none;
    }
}

/* Pagination Styles */
.mtr-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin: 30px 0 20px 0;
    flex-wrap: wrap;
}

.mtr-pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.mtr-pagination-link:hover {
    background: #007cba;
    color: white;
    border-color: #007cba;
    text-decoration: none;
}

.mtr-pagination-link:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.mtr-pagination-current {
    background: #007cba;
    color: white;
    border-color: #007cba;
    cursor: default;
}

.mtr-pagination-current:hover {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.mtr-pagination-disabled {
    background: #f5f5f5;
    color: #999;
    border-color: #ddd;
    cursor: not-allowed;
}

.mtr-pagination-disabled:hover {
    background: #f5f5f5;
    color: #999;
    border-color: #ddd;
}

.mtr-pagination-numbers {
    display: flex;
    align-items: center;
    gap: 5px;
}

.mtr-pagination-ellipsis {
    padding: 8px 4px;
    color: #666;
    font-size: 14px;
}

.mtr-pagination-prev,
.mtr-pagination-next {
    padding: 8px 16px;
    font-weight: 600;
}

/* Style Variations for Pagination */

/* Minimal Style */
.mtr-style-minimal .mtr-pagination {
    margin: 20px 0;
}

.mtr-style-minimal .mtr-pagination-link {
    border: none;
    background: transparent;
    color: #007cba;
    border-radius: 0;
    border-bottom: 2px solid transparent;
}

.mtr-style-minimal .mtr-pagination-link:hover {
    background: transparent;
    color: #005a87;
    border-bottom-color: #005a87;
}

.mtr-style-minimal .mtr-pagination-current {
    background: transparent;
    color: #333;
    border-bottom-color: #007cba;
}

.mtr-style-minimal .mtr-pagination-disabled {
    background: transparent;
    color: #ccc;
    border-bottom-color: transparent;
}

/* Card Style */
.mtr-style-card .mtr-pagination-link {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: none;
    border-radius: 6px;
}

.mtr-style-card .mtr-pagination-link:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.mtr-style-card .mtr-pagination-current {
    box-shadow: 0 4px 8px rgba(0,123,186,0.3);
}

.mtr-style-card .mtr-pagination-disabled {
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Modern Style */
.mtr-style-modern .mtr-pagination {
    margin: 40px 0 30px 0;
}

.mtr-style-modern .mtr-pagination-link {
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    font-weight: 600;
}

.mtr-style-modern .mtr-pagination-link:hover {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    border-color: #007cba;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,123,186,0.3);
}

.mtr-style-modern .mtr-pagination-current {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    border-color: #007cba;
    box-shadow: 0 4px 12px rgba(0,123,186,0.3);
}

.mtr-style-modern .mtr-pagination-disabled {
    background: linear-gradient(135deg, #f5f5f5 0%, #e9ecef 100%);
    border-color: #e1e1e1;
}

/* Responsive Design for Pagination */
@media (max-width: 768px) {
    .mtr-pagination {
        gap: 3px;
        margin: 20px 0 15px 0;
    }
    
    .mtr-pagination-link {
        min-width: 35px;
        height: 35px;
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .mtr-pagination-prev,
    .mtr-pagination-next {
        padding: 6px 12px;
    }
    
    .mtr-pagination-numbers {
        gap: 3px;
    }
}

@media (max-width: 480px) {
    .mtr-pagination {
        gap: 2px;
        margin: 15px 0 10px 0;
    }
    
    .mtr-pagination-link {
        min-width: 32px;
        height: 32px;
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .mtr-pagination-prev,
    .mtr-pagination-next {
        padding: 4px 10px;
    }
    
    /* Hide some page numbers on very small screens */
    .mtr-pagination-numbers .mtr-pagination-number:not(.mtr-pagination-current) {
        display: none;
    }
    
    .mtr-pagination-numbers .mtr-pagination-current,
    .mtr-pagination-numbers .mtr-pagination-number:first-child,
    .mtr-pagination-numbers .mtr-pagination-number:last-child {
        display: inline-flex;
    }
    
    .mtr-pagination-ellipsis {
        display: none;
    }
}

/* Loading state for pagination */
.mtr-pagination-loading {
    opacity: 0.6;
    pointer-events: none;
}

.mtr-pagination-loading .mtr-pagination-link {
    cursor: wait;
}

/* Smooth scroll anchor for pagination navigation */
.mtr-reviews-anchor {
    display: block;
    position: relative;
    top: -100px;
    visibility: hidden;
}
