/* เสียงจากผู้รับบริการ - Frontend Styles (Medical Theme) */

/* Popup Container */
.pvp-popup-container {
    position: fixed;
    left: -420px;
    top: 50%;
    transform: translateY(-50%);
    width: 380px;
    max-width: 90vw;
    background: #ffffff;
    border-radius: 0 16px 16px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 9999;
    transition: left 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border-left: 4px solid #0891b2;
}

.pvp-popup-container.active {
    left: 0;
}

/* Header */
.pvp-popup-header {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    color: #ffffff;
    padding: 20px;
    border-radius: 0 16px 0 0;
    position: relative;
}

.pvp-popup-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pvp-popup-title::before {
    content: "💬";
    font-size: 22px;
}

.pvp-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pvp-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Content */
.pvp-popup-content {
    padding: 24px;
    max-height: 420px;
    overflow-y: auto;
}

.pvp-voice-item {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.pvp-voice-item.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Voice Card */
.pvp-voice-card {
    background: #f0fdfa;
    border-left: 4px solid #0891b2;
    border-radius: 8px;
    padding: 20px;
    position: relative;
}

.pvp-voice-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #ccfbf1;
}

.pvp-department {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #0891b2;
    border: 1px solid #99f6e4;
}

.pvp-department::before {
    content: "🏥";
    font-size: 14px;
}

.pvp-date {
    font-size: 13px;
    color: #0e7490;
    display: flex;
    align-items: center;
    gap: 4px;
	display:none;
}

.pvp-date::before {
    content: "📅";
    font-size: 12px;
		display:none;
}

/* Voice Text */
.pvp-voice-text {
    font-size: 15px;
    line-height: 1.7;
    color: #164e63;
    margin: 0;
    position: relative;
    padding: 0;
}

.pvp-voice-text::before {
    content: """;
    position: absolute;
    left: -16px;
    top: -8px;
    font-size: 40px;
    color: #5eead4;
    font-family: Georgia, serif;
    opacity: 0.5;
}

/* Navigation */
.pvp-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-top: 2px solid #e0f2fe;
    background: #f8fafc;
}

.pvp-nav-btn {
    background: #0891b2;
    border: none;
    color: #ffffff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.2);
}

.pvp-nav-btn:hover {
    background: #0e7490;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
}

.pvp-nav-btn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: scale(1);
    box-shadow: none;
}

.pvp-dots {
    display: flex;
    gap: 8px;
}

.pvp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pvp-dot.active {
    background: #0891b2;
    width: 28px;
    border-radius: 4px;
}

/* Toggle Button */
.pvp-toggle-btn {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    color: #ffffff;
    border: none;
    padding: 16px 10px;
    border-radius: 0 10px 10px 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    box-shadow: 3px 3px 12px rgba(8, 145, 178, 0.3);
    z-index: 9998;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.pvp-toggle-btn:hover {
    padding-left: 14px;
    box-shadow: 4px 4px 16px rgba(8, 145, 178, 0.4);
}

.pvp-toggle-btn.hidden {
    left: -60px;
}

/* Loading State */
.pvp-loading {
    text-align: center;
    padding: 50px 20px;
    color: #0891b2;
}

.pvp-spinner {
    display: inline-block;
    width: 45px;
    height: 45px;
    border: 4px solid #e0f2fe;
    border-top-color: #0891b2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Empty State */
.pvp-empty {
    text-align: center;
    padding: 50px 20px;
    color: #64748b;
}

.pvp-empty-icon {
    font-size: 56px;
    margin-bottom: 12px;
}

.pvp-empty p {
    margin: 0;
    color: #0891b2;
}

/* Counter */
.pvp-counter {
    text-align: center;
    padding: 12px;
    background: #ecfeff;
    color: #0891b2;
    font-size: 13px;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .pvp-popup-container {
        width: 340px;
    }
    
    .pvp-popup-content {
        max-height: 320px;
        padding: 18px;
    }
    
    .pvp-voice-card {
        padding: 16px;
    }
    
    .pvp-voice-text {
        font-size: 14px;
    }
}

/* Scrollbar */
.pvp-popup-content::-webkit-scrollbar {
    width: 6px;
}

.pvp-popup-content::-webkit-scrollbar-track {
    background: #f0fdfa;
}

.pvp-popup-content::-webkit-scrollbar-thumb {
    background: #99f6e4;
    border-radius: 3px;
}

.pvp-popup-content::-webkit-scrollbar-thumb:hover {
    background: #5eead4;
}

/* Accessibility */
.pvp-popup-container:focus-within {
    box-shadow: 0 8px 32px rgba(8, 145, 178, 0.25);
}

/* Medical Professional Style Enhancements */
.pvp-voice-card::after {
    content: '';
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%230891b2" opacity="0.1"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/></svg>') no-repeat center;
    background-size: contain;
    opacity: 0.1;
}

/* ==============================================
   TESTIMONIAL PAGE STYLES - MODERN DESIGN
   ============================================== */

/* Force Full Width และ Override Theme */
body.page .pvp-testimonial-page,
.pvp-testimonial-page {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%) !important;
    min-height: 100vh !important;
    padding: 80px 0 100px !important;
    position: relative;
    overflow: hidden;
    margin: 0 !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    width: 100vw !important;
    max-width: 100vw !important;
}

/* Reset และ Isolation สำหรับหน้า Testimonial */
.pvp-testimonial-page,
.pvp-testimonial-page * {
    box-sizing: border-box !important;
}

/* Override Theme Container/Wrapper */
.site-content .pvp-testimonial-page,
.entry-content .pvp-testimonial-page,
main .pvp-testimonial-page,
article .pvp-testimonial-page,
.content-area .pvp-testimonial-page {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%) !important;
    padding: 80px 0 100px !important;
}

/* Background Decorations */
.pvp-testimonial-page::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

.pvp-testimonial-page::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, 30px) scale(1.1); }
}

.pvp-testimonial-page .pvp-page-container {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 30px !important;
    position: relative;
    z-index: 1;
    width: 100%;
}

/* Page Header - Modern Glassmorphism */
.pvp-testimonial-page .pvp-page-header {
    text-align: center !important;
    margin-bottom: 70px !important;
    padding: 50px 40px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 24px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pvp-testimonial-page .pvp-page-title {
    font-size: 56px !important;
    font-weight: 800 !important;
    background: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 50%, #38bdf8 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    color: #06b6d4 !important; /* Fallback สำหรับ browser ที่ไม่รองรับ */
    margin: 0 0 20px 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 20px !important;
    font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    letter-spacing: -1px !important;
    line-height: 1.2 !important;
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(6, 182, 212, 0.5)); }
    50% { filter: drop-shadow(0 0 30px rgba(6, 182, 212, 0.8)); }
}

.pvp-page-title::before {
    content: "💬";
    font-size: 60px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.pvp-testimonial-page .pvp-page-subtitle {
    font-size: 20px !important;
    color: #cbd5e1 !important;
    margin: 0 !important;
    font-weight: 400 !important;
    letter-spacing: 0.5px !important;
    line-height: 1.5 !important;
    opacity: 0;
    animation: fadeIn 1s ease-out 0.3s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Testimonials Grid - Masonry Style */
.pvp-testimonial-page .pvp-testimonials-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)) !important;
    gap: 35px !important;
    margin-bottom: 60px !important;
    list-style: none !important;
    padding: 0 !important;
}

/* Testimonial Card - Glassmorphism with Gradient Border */
.pvp-testimonial-page .pvp-testimonial-card {
    position: relative !important;
    background: rgba(255, 255, 255, 0.08) !important;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-radius: 20px !important;
    overflow: hidden !important;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    opacity: 0;
    transform: translateY(30px);
    animation: cardSlideIn 0.6s ease-out forwards;
    margin: 0 !important;
}

@keyframes cardSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pvp-testimonial-page .pvp-testimonial-card:nth-child(1) { animation-delay: 0.1s; }
.pvp-testimonial-page .pvp-testimonial-card:nth-child(2) { animation-delay: 0.2s; }
.pvp-testimonial-page .pvp-testimonial-card:nth-child(3) { animation-delay: 0.3s; }
.pvp-testimonial-page .pvp-testimonial-card:nth-child(4) { animation-delay: 0.4s; }
.pvp-testimonial-page .pvp-testimonial-card:nth-child(5) { animation-delay: 0.5s; }
.pvp-testimonial-page .pvp-testimonial-card:nth-child(6) { animation-delay: 0.6s; }
.pvp-testimonial-page .pvp-testimonial-card:nth-child(n+7) { animation-delay: 0.7s; }

/* Gradient Border Effect - Simplified Version */
.pvp-testimonial-page .pvp-testimonial-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 20px;
    background: linear-gradient(135deg, #06b6d4, #0ea5e9, #38bdf8);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.pvp-testimonial-page .pvp-testimonial-card:hover::before {
    opacity: 1;
}

.pvp-testimonial-page .pvp-testimonial-card:hover {
    transform: translateY(-12px) scale(1.02) !important;
    box-shadow: 0 20px 60px rgba(6, 182, 212, 0.3), 0 0 0 1px rgba(6, 182, 212, 0.2) !important;
    background: rgba(255, 255, 255, 0.12) !important;
}

.pvp-testimonial-page .pvp-card-header {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(14, 165, 233, 0.1) 100%) !important;
    padding: 24px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    position: relative;
    overflow: hidden;
    margin: 0 !important;
}

.pvp-testimonial-page .pvp-card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s ease;
}

.pvp-testimonial-page .pvp-testimonial-card:hover .pvp-card-header::before {
    left: 100%;
}

.pvp-testimonial-page .pvp-card-department {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    background: rgba(6, 182, 212, 0.2) !important;
    padding: 10px 18px !important;
    border-radius: 25px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #67e8f9 !important;
    border: 1px solid rgba(103, 232, 249, 0.3) !important;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.2) !important;
    transition: all 0.3s ease !important;
    position: relative;
    z-index: 1;
    margin: 0 !important;
    line-height: 1 !important;
}

.pvp-testimonial-page .pvp-card-department:hover {
    background: rgba(6, 182, 212, 0.3) !important;
    transform: scale(1.05);
}

.pvp-testimonial-page .pvp-card-department::before {
    content: "🏥";
    font-size: 18px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.pvp-testimonial-page .pvp-card-date {
    font-size: 13px !important;
    color: #94a3b8 !important;
    font-weight: 500 !important;
    background: rgba(255, 255, 255, 0.05) !important;
    padding: 6px 12px !important;
    border-radius: 15px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    position: relative;
    z-index: 1;
    margin: 0 !important;
    line-height: 1 !important;
}

.pvp-testimonial-page .pvp-card-content {
    padding: 30px !important;
    font-size: 16px !important;
    line-height: 1.9 !important;
    color: #e2e8f0 !important;
    position: relative;
    min-height: 120px;
    margin: 0 !important;
}

.pvp-testimonial-page .pvp-card-content::before {
    content: """;
    position: absolute;
    left: 15px;
    top: 15px;
    font-size: 80px;
    background: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #06b6d4; /* Fallback */
    font-family: Georgia, serif;
    opacity: 0.2;
    line-height: 1;
}

.pvp-testimonial-page .pvp-card-content p {
    margin: 0 !important;
    position: relative;
    z-index: 1;
    padding-left: 30px !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    color: #e2e8f0 !important;
    line-height: 1.9 !important;
}

/* Decorative Element */
.pvp-testimonial-page .pvp-card-content::after {
    content: '';
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(14, 165, 233, 0.1) 100%);
    border-radius: 50%;
    filter: blur(10px);
}

/* No Testimonials */
.pvp-testimonial-page .pvp-no-testimonials {
    grid-column: 1 / -1 !important;
    text-align: center !important;
    padding: 120px 20px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 24px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin: 0 !important;
}

.pvp-testimonial-page .pvp-no-testimonials .pvp-empty-icon {
    font-size: 100px !important;
    margin-bottom: 30px !important;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
    animation: float 3s ease-in-out infinite;
}

.pvp-testimonial-page .pvp-no-testimonials p {
    font-size: 22px !important;
    color: #cbd5e1 !important;
    margin: 0 !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
}

/* Responsive Testimonial Page */
@media (max-width: 1024px) {
    .pvp-testimonial-page .pvp-testimonials-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
        gap: 28px !important;
    }
}

@media (max-width: 768px) {
    .pvp-testimonial-page {
        padding: 60px 0 80px !important;
    }

    .pvp-testimonial-page .pvp-page-container {
        padding: 0 20px !important;
    }

    .pvp-testimonial-page .pvp-page-header {
        padding: 40px 25px !important;
        margin-bottom: 50px !important;
    }

    .pvp-testimonial-page .pvp-page-title {
        font-size: 38px !important;
        flex-direction: column !important;
        gap: 15px !important;
    }

    .pvp-testimonial-page .pvp-page-title::before {
        font-size: 48px !important;
    }

    .pvp-testimonial-page .pvp-page-subtitle {
        font-size: 17px !important;
    }

    .pvp-testimonial-page .pvp-testimonials-grid {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
    }

    .pvp-testimonial-page .pvp-card-header {
        flex-direction: column !important;
        gap: 12px !important;
        align-items: flex-start !important;
        padding: 20px !important;
    }

    .pvp-testimonial-page .pvp-card-content {
        padding: 24px !important;
    }

    .pvp-testimonial-page .pvp-card-content::before {
        font-size: 60px !important;
    }
}

@media (max-width: 480px) {
    .pvp-testimonial-page .pvp-page-title {
        font-size: 32px !important;
    }

    .pvp-testimonial-page .pvp-page-subtitle {
        font-size: 15px !important;
    }

    .pvp-testimonial-page .pvp-card-content {
        font-size: 15px !important;
        padding: 20px !important;
    }

    .pvp-testimonial-page .pvp-card-content p {
        padding-left: 20px !important;
    }
}

/* Sticky Button as Link */
.pvp-toggle-btn {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pvp-toggle-btn:hover {
    text-decoration: none;
    color: #ffffff;
}
