/**
 * MLP Testimonials Widget Styles
 *
 * @package MyLandingPageAI
 * @since 1.0.0
 */

/* ===========================================
   Base Container
   =========================================== */
.mlp-testimonials {
    width: 100%;
    box-sizing: border-box;
}

.mlp-testimonials__section + .mlp-testimonials__section {
    margin-top: 30px;
}

.mlp-testimonials__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ===========================================
   Demo Badge
   =========================================== */
.mlp-testimonials__demo-badge {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

/* ===========================================
   Text Testimonial Card
   =========================================== */
.mlp-testimonial-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.mlp-testimonial-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Stars */
.mlp-testimonial-card__stars {
    display: flex;
    gap: 2px;
    margin-bottom: 12px;
}

.mlp-testimonial-card__stars svg {
    width: 18px;
    height: 18px;
    fill: #ffc107;
}

/* Quote */
.mlp-testimonial-card__quote {
    font-style: italic;
    margin: 0 0 15px 0;
    padding: 0;
    flex-grow: 1;
    line-height: 1.6;
    color: #333;
}

/* Author */
.mlp-testimonial-card__author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

/* Photo */
.mlp-testimonial-card__photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.mlp-testimonial-card__photo--placeholder {
    background: linear-gradient(135deg, #e0e0e0 0%, #c0c0c0 100%);
}

/* Info */
.mlp-testimonial-card__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mlp-testimonial-card__name {
    font-weight: 600;
    font-size: 14px;
    color: #222;
}

.mlp-testimonial-card__position {
    font-size: 12px;
    color: #666;
}

/* ===========================================
   Video Testimonial
   =========================================== */
.mlp-testimonial-video {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.mlp-testimonial-video__thumbnail-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    background: #1a1a1a;
}

.mlp-testimonial-video__thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.3s ease;
}

.mlp-testimonial-video:hover .mlp-testimonial-video__thumbnail {
    transform: scale(1.03);
}

.mlp-testimonial-video__thumbnail--placeholder {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
}

/* Play Button */
.mlp-testimonial-video__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.mlp-testimonial-video__play:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.mlp-testimonial-video__play:disabled {
    cursor: default;
    opacity: 0.8;
}

.mlp-testimonial-video__play:disabled:hover {
    transform: translate(-50%, -50%);
}

.mlp-testimonial-video__play svg {
    width: 24px;
    height: 24px;
    margin-left: 3px; /* Optische Zentrierung des Play-Icons */
    color: #333;
}

/* Video Label */
.mlp-testimonial-video__label {
    display: block;
    padding: 10px 12px;
    font-size: 13px;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
}

/* Video Embed State */
.mlp-testimonial-video--playing .mlp-testimonial-video__thumbnail-wrapper {
    padding-bottom: 0;
}

.mlp-testimonial-video--playing .mlp-testimonial-video__play,
.mlp-testimonial-video--playing .mlp-testimonial-video__thumbnail {
    display: none;
}

.mlp-testimonial-video__iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ===========================================
   Empty State (Editor)
   =========================================== */
.mlp-testimonials__empty-state {
    text-align: center;
    padding: 40px 20px;
    background: #f6f7f7;
    border: 2px dashed #ddd;
    border-radius: 8px;
}

.mlp-testimonials__empty-state .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #aaa;
    margin-bottom: 15px;
}

.mlp-testimonials__empty-state p {
    margin: 0 0 5px 0;
    font-weight: 600;
    color: #666;
}

.mlp-testimonials__empty-state small {
    color: #999;
}

/* ===========================================
   Responsive - Tablet
   =========================================== */
@media (max-width: 1024px) {
    .mlp-testimonials__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .mlp-testimonial-card__photo {
        width: 50px;
        height: 50px;
    }

    .mlp-testimonial-video__play {
        width: 50px;
        height: 50px;
    }

    .mlp-testimonial-video__play svg {
        width: 20px;
        height: 20px;
    }
}

/* ===========================================
   Responsive - Mobile
   =========================================== */
@media (max-width: 767px) {
    .mlp-testimonials__grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .mlp-testimonials__section + .mlp-testimonials__section {
        margin-top: 20px;
    }

    .mlp-testimonial-card {
        padding: 15px;
    }

    .mlp-testimonial-card__quote {
        font-size: 14px;
    }

    .mlp-testimonial-card__photo {
        width: 45px;
        height: 45px;
    }

    .mlp-testimonial-card__name {
        font-size: 13px;
    }

    .mlp-testimonial-card__position {
        font-size: 11px;
    }

    .mlp-testimonial-video__play {
        width: 45px;
        height: 45px;
    }

    .mlp-testimonial-video__play svg {
        width: 18px;
        height: 18px;
    }
}

/* ===========================================
   Schema.org / SEO Hidden Elements
   =========================================== */
.mlp-testimonial-card meta {
    display: none;
}

/* ===========================================
   Animation - Fade In on Scroll (optional)
   =========================================== */
.mlp-testimonials[data-animate="true"] .mlp-testimonial-card,
.mlp-testimonials[data-animate="true"] .mlp-testimonial-video {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.mlp-testimonials[data-animate="true"] .mlp-testimonial-card.is-visible,
.mlp-testimonials[data-animate="true"] .mlp-testimonial-video.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Animation */
.mlp-testimonials[data-animate="true"] .mlp-testimonials__grid > *:nth-child(1) { transition-delay: 0.1s; }
.mlp-testimonials[data-animate="true"] .mlp-testimonials__grid > *:nth-child(2) { transition-delay: 0.2s; }
.mlp-testimonials[data-animate="true"] .mlp-testimonials__grid > *:nth-child(3) { transition-delay: 0.3s; }
.mlp-testimonials[data-animate="true"] .mlp-testimonials__grid > *:nth-child(4) { transition-delay: 0.4s; }
.mlp-testimonials[data-animate="true"] .mlp-testimonials__grid > *:nth-child(5) { transition-delay: 0.5s; }
.mlp-testimonials[data-animate="true"] .mlp-testimonials__grid > *:nth-child(6) { transition-delay: 0.6s; }
