/* ===== HELPDESK CHATBOT ===== */
/* Professional & Modern Chatbot Widget */

/* Chat Button */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Poppins', sans-serif;
}

.chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    animation: pulse 2s infinite;
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

.chat-button i {
    font-size: 28px;
    color: white;
}

.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    animation: bounce 1s infinite;
}

/* Chat Window */
.chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 550px;
    max-height: calc(100vh - 150px);
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
    z-index: 9998;
}

.chat-window.active {
    display: flex;
}

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-avatar i {
    font-size: 24px;
    color: #25D366;
}

.chat-header-info {
    flex: 1;
}

.chat-header-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chat-header-info p {
    margin: 5px 0 0;
    font-size: 12px;
    opacity: 0.9;
}

.chat-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    animation: blink 2s infinite;
}

.chat-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Chat Body */
.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f5f5f5;
    scroll-behavior: smooth;
}

.chat-welcome {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.chat-welcome h4 {
    margin: 0 0 10px;
    color: #333;
    font-size: 16px;
}

.chat-welcome p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* Quick Replies */
.quick-replies {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quick-reply-btn {
    background: white;
    border: 2px solid #e0e0e0;
    padding: 15px;
    border-radius: 12px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #333;
    font-size: 14px;
}

.quick-reply-btn:hover {
    border-color: #25D366;
    background: #f0fdf4;
    transform: translateX(5px);
}

.quick-reply-btn i {
    font-size: 20px;
    color: #25D366;
    min-width: 24px;
}

/* Special styling for biaya buttons */
.quick-reply-btn[data-message*="biaya"] i,
.quick-reply-btn[data-message*="Biaya"] i,
.quick-reply-btn[data-message*="Beasiswa"] i {
    color: #d4af37;
}

.quick-reply-btn[data-message*="biaya"]:hover,
.quick-reply-btn[data-message*="Biaya"]:hover,
.quick-reply-btn[data-message*="Beasiswa"]:hover {
    border-color: #d4af37;
    background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
}

/* Special styling for PPDB link button */
.quick-reply-btn.btn-ppdb-link {
    background: linear-gradient(135deg, #e8f5e9 0%, #ffffff 100%);
    border-color: #4caf50;
}

.quick-reply-btn.btn-ppdb-link i:first-child {
    color: #4caf50;
}

.quick-reply-btn.btn-ppdb-link:hover {
    border-color: #4caf50;
    background: linear-gradient(135deg, #c8e6c9 0%, #e8f5e9 100%);
    transform: translateX(5px);
}

.quick-reply-btn.btn-ppdb-link:hover i:last-child {
    transform: translateX(3px);
    transition: transform 0.3s ease;
}

/* Chat Footer */
.chat-footer {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.chat-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.chat-input:focus {
    border-color: #25D366;
}

.chat-send-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-send-btn:hover {
    transform: scale(1.1);
}

.chat-send-btn i {
    font-size: 18px;
}

/* Powered By */
.chat-powered {
    text-align: center;
    padding: 10px;
    font-size: 11px;
    color: #999;
}

/* Bot Response Styles */
.bot-response {
    margin-top: 15px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.bot-response.show {
    opacity: 1;
    transform: translateY(0);
}

.biaya-info-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fffe 100%);
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border: 2px solid #e8f5e9;
    overflow: hidden;
}

.biaya-info-card h4 {
    margin: 0 0 20px;
    font-size: 16px;
    font-weight: 700;
    padding: 20px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    text-align: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    position: relative;
    overflow: hidden;
}

.biaya-info-card h4::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.biaya-categories {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
    padding: 0 20px 20px 20px;
}

.biaya-category {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.biaya-category:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.15);
    border-color: #25D366;
}

.biaya-category.highlight-beasiswa {
    background: linear-gradient(135deg, #fff9e6 0%, #fffbf0 100%);
    border: 2px solid #d4af37;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.biaya-category.highlight-beasiswa:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
    border-color: #c9a02c;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.category-header strong {
    font-size: 15px;
    color: #1a1a1a;
    font-weight: 700;
}

.badge-gratis {
    background: linear-gradient(135deg, #ffd700 0%, #d4af37 100%);
    color: #1a1a1a;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
    }
    50% {
        box-shadow: 0 2px 15px rgba(212, 175, 55, 0.5);
    }
}

.category-details {
    font-size: 12px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    margin: 3px 0;
    background: rgba(37, 211, 102, 0.05);
    border-radius: 8px;
    transition: all 0.2s ease;
    gap: 5px;
}

.detail-row:hover {
    background: rgba(37, 211, 102, 0.1);
    transform: translateX(3px);
}

.detail-row span {
    color: #555;
    font-size: 10.5px;
    font-weight: 500;
    line-height: 1.2;
    flex: 0 1 auto;
    min-width: 0;
}

.detail-row strong {
    color: #25D366;
    font-weight: 700;
    font-size: 12px;
    text-align: right;
    white-space: nowrap;
    flex-shrink: 0;
}

.detail-benefit {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #ddd;
    font-size: 11px;
    color: #666;
    font-style: italic;
}

.biaya-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
    padding: 0 20px;
}

.biaya-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 10px;
    font-size: 13px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.biaya-item:hover {
    transform: translateX(5px);
    border-color: #25D366;
    box-shadow: 0 3px 10px rgba(37, 211, 102, 0.1);
}

.biaya-label {
    color: #555;
    font-weight: 600;
    font-size: 14px;
}

.biaya-value {
    color: #25D366;
    font-weight: 700;
    font-size: 15px;
}

.biaya-note {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 100%);
    border-left: 5px solid #4caf50;
    padding: 15px 20px;
    border-radius: 0 0 15px 15px;
    font-size: 12px;
    color: #2e7d32;
    line-height: 1.6;
    margin: 15px 0 0 0;
    box-shadow: inset 0 2px 8px rgba(76, 175, 80, 0.1);
    position: relative;
}

.biaya-note::before {
    content: '💡';
    position: absolute;
    left: -2px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    animation: pulse-light 2s infinite;
}

@keyframes pulse-light {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.biaya-note strong {
    color: #1b5e20;
    font-weight: 700;
}

.biaya-cta-bot {
    margin-top: 0;
    padding: 20px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.btn-wa-detail {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border: none;
    padding: 14px 25px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-wa-detail::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-wa-detail:hover::before {
    width: 300px;
    height: 300px;
}

.btn-wa-detail:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
}

.beasiswa-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.beasiswa-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 10px;
    border-left: 3px solid #d4af37;
}

.beasiswa-item h5 {
    margin: 0 0 8px;
    color: #333;
    font-size: 14px;
}

.beasiswa-item p {
    margin: 5px 0;
    font-size: 12px;
    color: #666;
}

.beasiswa-item ul {
    margin: 8px 0;
    padding-left: 20px;
    font-size: 12px;
    color: #666;
}

.beasiswa-item li {
    margin: 4px 0;
    line-height: 1.4;
}

/* Fasilitas Styles */
.fasilitas-card {
    max-height: 450px;
    overflow-y: auto;
}

.fasilitas-subtitle {
    text-align: center;
    color: #666;
    font-size: 13px;
    margin: -5px 0 15px;
    font-style: italic;
}

.fasilitas-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 15px;
}

.fasilitas-item {
    display: flex;
    gap: 12px;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 10px;
    border-left: 3px solid #1e40af;
    transition: all 0.3s ease;
}

.fasilitas-item:hover {
    background: #e8f4f8;
    transform: translateX(3px);
}

.fasilitas-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fasilitas-icon i {
    font-size: 20px;
    color: white;
}

.fasilitas-content {
    flex: 1;
}

.fasilitas-content h5 {
    margin: 0 0 5px;
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.fasilitas-content p {
    margin: 0;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* Scrollbar */
.chat-body::-webkit-scrollbar {
    width: 6px;
}

.chat-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-body::-webkit-scrollbar-thumb {
    background: #25D366;
    border-radius: 10px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chat-widget {
        bottom: 20px;
        right: 20px;
    }
    
    .chat-button {
        width: 55px;
        height: 55px;
    }
    
    .chat-button i {
        font-size: 24px;
    }
    
    .chat-window {
        bottom: 85px;
        right: 20px;
        width: calc(100vw - 40px);
        height: calc(100vh - 120px);
    }
}

/* Dark Mode Support */
body.dark-mode .chat-window {
    background: #1a1a1a;
}

body.dark-mode .chat-body {
    background: #2a2a2a;
}

body.dark-mode .chat-welcome {
    background: #333;
}

body.dark-mode .chat-welcome h4 {
    color: #fff;
}

body.dark-mode .chat-welcome p {
    color: #ccc;
}

body.dark-mode .quick-reply-btn {
    background: #333;
    border-color: #444;
    color: #fff;
}

body.dark-mode .quick-reply-btn:hover {
    background: #2a4a2a;
}

body.dark-mode .chat-footer {
    background: #1a1a1a;
    border-top-color: #333;
}

body.dark-mode .chat-input {
    background: #333;
    border-color: #444;
    color: #fff;
}

/* Dark Mode - Bot Response */
body.dark-mode .biaya-info-card {
    background: #333;
}

body.dark-mode .biaya-info-card h4 {
    color: #fff;
    border-bottom-color: #25D366;
}

body.dark-mode .biaya-category {
    background: #2a2a2a;
}

body.dark-mode .category-header {
    color: #fff;
}

body.dark-mode .detail-row {
    color: #ccc;
}

body.dark-mode .biaya-item {
    background: #2a2a2a;
}

body.dark-mode .biaya-label {
    color: #ccc;
}

body.dark-mode .biaya-note {
    background: #2a4a2a;
    border-left-color: #4caf50;
    color: #a5d6a7;
}

body.dark-mode .beasiswa-item {
    background: #2a2a2a;
}

body.dark-mode .beasiswa-item h5 {
    color: #fff;
}

body.dark-mode .beasiswa-item p,
body.dark-mode .beasiswa-item ul,
body.dark-mode .beasiswa-item li {
    color: #ccc;
}

/* Dark Mode - PPDB Button */
body.dark-mode .quick-reply-btn.btn-ppdb-link {
    background: linear-gradient(135deg, #2a4a2a 0%, #333 100%);
    border-color: #4caf50;
}

body.dark-mode .quick-reply-btn.btn-ppdb-link:hover {
    background: linear-gradient(135deg, #3a5a3a 0%, #2a4a2a 100%);
}

/* Dark Mode - Fasilitas */
body.dark-mode .fasilitas-subtitle {
    color: #ccc;
}

body.dark-mode .fasilitas-item {
    background: #2a2a2a;
    border-left-color: #3b82f6;
}

body.dark-mode .fasilitas-item:hover {
    background: #333;
}

body.dark-mode .fasilitas-content h5 {
    color: #fff;
}

body.dark-mode .fasilitas-content p {
    color: #ccc;
}
