/* DP Kunleisys Frontend Widget Styles */

.dp-kunleisys-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 100%;
    margin: 0 auto;
}

.dp-kunleisys-widget * {
    box-sizing: border-box;
}

/* Overview Styles */
.dp-kunleisys-overview {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e1e1e1;
}

.dp-kunleisys-overview h2 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    border-bottom: 3px solid #3498db;
    padding-bottom: 15px;
}

.overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.overview-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.overview-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2980b9);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.overview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #3498db;
}

.overview-card:hover::before {
    transform: scaleX(1);
}

.overview-card h3 {
    margin: 0 0 15px 0;
    color: #7f8c8d;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rating-value {
    font-size: 20px;
    font-weight: 700;
    color: #e74c3c;
}

.status-value {
    font-size: 20px;
    font-weight: 700;
    color: #27ae60;
}

.recommendation-value {
    font-size: 20px;
    font-weight: 700;
    color: #f39c12;
}

.total-reviews-value {
    font-size: 20px;
    font-weight: 700;
    color: #9b59b6;
}

/* Reviews Styles */
.dp-kunleisys-reviews {
    background: #fff;
    border-radius: 8px;
    padding: 10px 30px 0 30px ;
}

.dp-kunleisys-reviews h2 {
    margin: 0 0 25px 0;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    border-bottom: 3px solid #3498db;
    padding-bottom: 15px;
}

.reviews-grid {
    margin-top: 25px;
}

.reviews-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 25px;
}

.review-card {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    padding: 25px;
    position: relative;
    overflow: hidden;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
    padding-bottom: 3px;
    border-bottom: 2px solid #ecf0f1;
}

.review-date {
    font-size: 12px;
    color: #7f8c8d;
    font-weight: 600;
    background: #ecf0f1;
    padding: 4px 10px;
    border-radius: 15px;
    line-height: 1;
}

.review-rating {
    background: linear-gradient(135deg, #A61008, #7a0b06);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    line-height: 1;
}

.review-comment {
    line-height: 1.7;
    color: #2c3e50;
    font-size: 15px;
    font-weight: 400;
    margin-top: 20px;
}

/* No Data Styles */
.dp-kunleisys-no-data {
    background: #fff;
    border-radius: 8px;
    padding: 50px 30px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e1e1e1;
}

.dp-kunleisys-no-data h2 {
    color: #7f8c8d;
    margin-bottom: 15px;
    font-size: 22px;
    font-weight: 500;
}

.dp-kunleisys-no-data p {
    color: #bdc3c7;
    font-size: 16px;
    margin: 0;
}


.dp-kunleisys-text {
    color: #666666;
    font-size: 24px;
    font-weight: 400;
}


/* Responsive Design */
@media (max-width: 768px) {
    .dp-kunleisys-widget {
        padding: 0 15px;
    }

    .dp-kunleisys-overview,
    .dp-kunleisys-reviews {
        padding: 20px;
        margin-bottom: 20px;
    }

    .dp-kunleisys-text {
        font-size: 20px;
    }

    .overview-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .reviews-row {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 20px;
    }

    .review-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
    }

    .review-date,
    .review-rating {
        font-size: 11px;
        padding: 4px 8px;
    }

    .rating-value {
        font-size: 24px;
    }

    .status-value {
        font-size: 18px;
        padding: 6px 12px;
    }

    .recommendation-value,
    .total-reviews-value {
        font-size: 20px;
    }

    .review-card {
        padding: 20px;
    }

    .review-comment {
        color: #666666;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .dp-kunleisys-overview h2,
    .dp-kunleisys-reviews h2 {
        font-size: 20px;
    }

    .dp-kunleisys-text {
        font-size: 20px;
    }

    .overview-card {
        padding: 20px 15px;
    }

    .rating-value {
        font-size: 22px;
    }

    .status-value {
        font-size: 16px;
    }

    .recommendation-value,
    .total-reviews-value {
        font-size: 18px;
    }
}

/* Animation für das Laden */
.dp-kunleisys-loading {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

.dp-kunleisys-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #3498db;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Accessibility */
.overview-card:focus,
.review-card:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .dp-kunleisys-widget {
        box-shadow: none;
    }

    .overview-card,
    .review-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc !important;
    }
}

/* Carousel Review Styles */
.dp-kunleisys-carousel-data {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.carousel-review-item {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 400px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.carousel-review-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Single Review Styles */
.single-review {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 10px 0;
}

.single-review .review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.single-review .review-date {
    color: #666;
    font-size: 0.9em;
    font-weight: 500;
}

.single-review .review-rating {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
}

.single-review .review-comment {
    font-style: italic;
    line-height: 1.6;
    color: #444;
    font-size: 1em;
}

/* Template Styles */

/* Minimal Template */
.minimal-review {
    text-align: center;
    padding: 15px;
}

.minimal-review .review-rating {
    font-size: 1.5em;
    color: #ffd700;
    font-weight: bold;
    margin-bottom: 10px;
    display: block;
}

.minimal-review .review-comment {
    font-style: italic;
    color: #555;
    line-height: 1.5;
}

/* Carousel Template Anpassungen - verwenden originale .review-card Styles */
.dp-kunleisys-reviews .card-review {
    /* Alle Styles kommen von der originalen .review-card Klasse */
    /* Keine Überschreibung nötig - verwenden Original-Design */
}

/* Detailed Template */
.detailed-review {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}

.detailed-review .review-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    margin: 0;
}

.detailed-review .review-header h4 {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    font-weight: 600;
}

.detailed-review .review-rating-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    display: inline-block;
}

.detailed-review .review-content {
    padding: 20px;
}

.detailed-review .review-content p {
    margin: 0;
    line-height: 1.6;
    color: #444;
    font-style: italic;
}

/* No Reviews Message */
.no-reviews {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
    background: #f9f9f9;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

/* Swiper Carousel Wrapper - Fixed Overflow */
.dp-kunleisys-reviews .dp-kunleisys-carousel-wrapper {
    position: relative;
    margin: 0;
    padding: 0;
    overflow: hidden;
    width: 100%;
}

.dp-kunleisys-reviews .dp-kunleisys-carousel-wrapper .swiper-container {
    width: 100%;
    height: auto;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

.dp-kunleisys-reviews .dp-kunleisys-carousel-wrapper .swiper-wrapper {
    display: flex;
    align-items: stretch;
    width: 100%;
    overflow: visible !important; /* Überschreibt Elementor's overflow: hidden */
    gap: unset !important; /* Entfernt Elementor's gap */
}

.dp-kunleisys-reviews .dp-kunleisys-carousel-wrapper .swiper-slide {
    height: auto;
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
    width: auto;
    margin-right: var(--dp-kunleisys-slide-spacing, 20px); /* Eigenes Spacing */
}

.dp-kunleisys-reviews .dp-kunleisys-carousel-wrapper .swiper-slide:last-child {
    margin-right: 0; /* Letzter Slide ohne margin */
} 

/* Carousel Review Cards verwenden originale .review-card Styles */
.dp-kunleisys-reviews .dp-kunleisys-carousel-wrapper .review-card {
    width: 100%;
    height: 100%;
    min-height: auto;
    margin: 0;
    display: flex;
    flex-direction: column;
    /* Alle anderen Styles kommen von der originalen .review-card Klasse */
}

/* Swiper Navigation - Versteckt per Standard */
.dp-kunleisys-reviews .dp-kunleisys-carousel-wrapper .swiper-button-next,
.dp-kunleisys-reviews .dp-kunleisys-carousel-wrapper .swiper-button-prev {
    display: none; /* Standardmäßig versteckt */
}

/* Swiper Pagination - Angepasst an Design */
.dp-kunleisys-reviews .dp-kunleisys-carousel-wrapper .swiper-pagination {
    position: relative;
    text-align: center;
    padding: 10px 0;
}

.dp-kunleisys-reviews .dp-kunleisys-carousel-wrapper .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #bdc3c7;
    opacity: 1;
    margin: 0 4px;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.dp-kunleisys-reviews .dp-kunleisys-carousel-wrapper .swiper-pagination-bullet-active {
    background: #A61008;
    transform: scale(1.3);
}

/* Responsive Design for Carousel */
@media (max-width: 768px) {
    .dp-kunleisys-reviews .dp-kunleisys-carousel-wrapper {
        padding: 0;
        margin: 0;
        overflow: hidden;
    }

    .dp-kunleisys-reviews .dp-kunleisys-carousel-wrapper .review-card {
        min-height: auto;
        /* Andere Styles kommen von originaler .review-card Klasse */
    }

    .carousel-review-item {
        max-width: 100%;
        margin: 0;
        min-height: 200px;
    }

    .dp-kunleisys-carousel-data {
        flex-direction: column;
    }

    .detailed-review .review-header {
        padding: 15px;
    }

    .detailed-review .review-content {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .dp-kunleisys-reviews .dp-kunleisys-carousel-wrapper {
        padding: 0;
        margin: 0;
        overflow: hidden;
    }

    .dp-kunleisys-reviews .dp-kunleisys-carousel-wrapper .review-card {
        min-height: auto;
        /* Andere Styles kommen von originaler .review-card Klasse */
    }
}


/* Equalize card heights in Swiper carousel rows (robust) */
.dp-kunleisys-reviews .dp-kunleisys-carousel-wrapper .swiper-wrapper {
    align-items: stretch !important; /* ensure all slides match tallest */
}
.dp-kunleisys-reviews .dp-kunleisys-carousel-wrapper .swiper-slide {
    height: auto !important; /* prevent fixed heights from libs */
    display: flex;            /* allow stretching content to slide */
    align-items: stretch;     /* stretch slide content vertically */
}
.dp-kunleisys-reviews .dp-kunleisys-carousel-wrapper .swiper-slide > .review-card {
    height: 100% !important;  /* make the card fill the entire slide */
    display: flex;            /* allow vertical layout inside card */
    flex-direction: column;
}
