/* Sukod WhatsApp Destek v4 - Frontend CSS */

/* Widget Container */
.sukod-wa-widget {
    position: fixed;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* WhatsApp Button */
.sukod-wa-button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 600;
    animation: pulse 2s infinite;
}

.sukod-wa-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.5);
}

.sukod-wa-button .wa-icon {
    width: 24px;
    height: 24px;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Popup */
.sukod-wa-popup {
    position: absolute;
    bottom: 80px;
    width: 380px;
    max-width: 90vw;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}

.sukod-wa-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.sukod-wa-widget.right-bottom .sukod-wa-popup,
.sukod-wa-widget.right-top .sukod-wa-popup {
    right: 0;
}

.sukod-wa-widget.left-bottom .sukod-wa-popup,
.sukod-wa-widget.left-top .sukod-wa-popup {
    left: 0;
}

.sukod-wa-widget.right-top .sukod-wa-popup,
.sukod-wa-widget.left-top .sukod-wa-popup {
    bottom: auto;
    top: 80px;
}

/* Popup Header */
.wa-popup-header {
    background: linear-gradient(135deg, #D52B10 0%, #fecb00 100%);
    color: #fff;
    padding: 20px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.wa-popup-header .header-content h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
}

.wa-popup-header .header-content p {
    margin: 0;
    font-size: 18px;
    opacity: 0.9;
}

.wa-close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    width: 0px;
    height: 70px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.wa-close-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1);
}

.wa-close-btn svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

/* Popup Body */
.wa-popup-body {
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.wa-popup-body::-webkit-scrollbar {
    width: 6px;
}

.wa-popup-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.wa-popup-body::-webkit-scrollbar-thumb {
    background: #25D366;
    border-radius: 10px;
}

/* Views */
.wa-view {
    display: none;
}

.wa-view.active {
    display: block;
}

/* Info Box */
.wa-info-box {
    background: #FFF9E6;
    border-left: 4px solid #FFC107;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #856404;
}

/* Section Button */
.wa-section {
    margin-bottom: 15px;
}

.wa-section-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wa-section-btn:hover {
    background: #f8f9fa;
    border-color: #D52B10;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.15);
}

.section-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #fecb00 0%, #D52B10 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.section-icon svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

.section-info {
    flex: 1;
    text-align: left;
}

.section-info strong {
    display: block;
    font-size: 15px;
    color: #333;
    margin-bottom: 4px;
}

.section-info span {
    display: block;
    font-size: 13px;
    color: #666;
}

.section-arrow {
    width: 16px;
    height: 16px;
    fill: #999;
    transition: all 0.3s ease;
}

.wa-section-btn:hover .section-arrow {
    fill: #25D366;
    transform: translateX(4px);
}

/* Message Form */
.wa-message-form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.wa-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.wa-input:focus {
    outline: none;
    border-color: #25D366;
}

.wa-send-btn {
    padding: 12px 24px;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wa-send-btn:hover {
    background: #128C7E;
    transform: translateY(-2px);
}

/* Privacy */
.wa-privacy {
    font-size: 12px;
    color: #666;
    text-align: center;
    line-height: 1.5;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

/* Back Button */
.wa-back-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    color: #D52B10;
    font-weight: 600;
    padding: 0 0 15px 0;
    margin-bottom: 15px;
    cursor: pointer;
    border-bottom: 2px solid #e9ecef;
    width: 100%;
    transition: all 0.3s ease;
}

.wa-back-btn:hover {
    color: #FECB00;
}

.wa-back-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Departments List */
.wa-departments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wa-department-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wa-department-item:hover {
    background: #e9f7ef;
    border-color: #25D366;
    transform: translateX(4px);
}

.dept-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dept-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dept-avatar svg {
    width: 28px;
    height: 28px;
    fill: #999;
}

.dept-info {
    flex: 1;
}

.dept-info strong {
    display: block;
    font-size: 15px;
    color: #333;
    margin-bottom: 4px;
}

.dept-info span {
    display: block;
    font-size: 13px;
    color: #666;
}

.dept-arrow {
    width: 16px;
    height: 16px;
    fill: #999;
    transition: all 0.3s ease;
}

.wa-department-item:hover .dept-arrow {
    fill: #25D366;
    transform: translateX(4px);
}

/* FAQs List */
.wa-faqs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wa-faq-item {
    padding: 14px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wa-faq-item:hover {
    background: #e9f7ef;
    border-color: #25D366;
}

.faq-question {
    flex: 1;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.faq-arrow {
    width: 16px;
    height: 16px;
    fill: #999;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.wa-faq-item:hover .faq-arrow {
    fill: #25D366;
    transform: translateX(4px);
}

/* FAQ Detail */
#wa-faq-detail-content {
    font-size: 14px;
    line-height: 1.8;
    color: #333;
}

#wa-faq-detail-content p {
    margin: 0 0 15px 0;
}

#wa-faq-detail-content strong {
    color: #25D366;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .sukod-wa-popup {
        width: 320px;
        max-width: calc(100vw - 40px);
    }

    .wa-popup-body {
        max-height: 400px;
    }

    .wa-section-btn {
        padding: 12px;
    }

    .section-icon {
        width: 40px;
        height: 40px;
    }

    .section-icon svg {
        width: 20px;
        height: 20px;
    }

    .dept-avatar {
        width: 42px;
        height: 42px;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .sukod-wa-widget.left-bottom,
    .sukod-wa-widget.right-bottom {
        bottom: 20px;
        left: 20px;
        right: 20px;
    }

    .sukod-wa-popup {
        width: 100%;
        max-width: none;
        left: 0 !important;
        right: 0 !important;
    }
}

/* Minimize Mode */
.sukod-wa-widget.minimized .sukod-wa-button .wa-text {
    display: none;
}

.sukod-wa-widget.minimized .sukod-wa-button {
    padding: 16px;
    border-radius: 50%;
}

/* Animation */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wa-department-item,
.wa-faq-item {
    animation: slideInUp 0.3s ease forwards;
}

.wa-department-item:nth-child(1),
.wa-faq-item:nth-child(1) {
    animation-delay: 0.05s;
}

.wa-department-item:nth-child(2),
.wa-faq-item:nth-child(2) {
    animation-delay: 0.1s;
}

.wa-department-item:nth-child(3),
.wa-faq-item:nth-child(3) {
    animation-delay: 0.15s;
}

.wa-department-item:nth-child(4),
.wa-faq-item:nth-child(4) {
    animation-delay: 0.2s;
}

.wa-department-item:nth-child(5),
.wa-faq-item:nth-child(5) {
    animation-delay: 0.25s;
}
