/* เสียงจากผู้รับบริการ - 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;
}
