/* icons.css - FontAwesome Icons Lokal */
/* chatbot.css - Semua CSS untuk Asisten Mahad Al Yusro */

/* VARIABLES */
:root {
    --primary-darkbot: #0c3b2e;
    --primarybot: #1a5c48;
    --primary-lightbot: #2e8b57;
    --secondarybot: #d4af37;
    --light-bgbot: #f4f6f8;
    --whitebot: #ffffff;
    --gray-lightbot: #e0e0e0;
    --text-darkbot: #333;
    --text-lightbot: #666;
    --successbot: #25D366;
    --whatsappbot: #25D366;
}

/* RESET & BASE STYLES */

.info-box {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: left;
}

.info-box h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-box ul {
    padding-left: 20px;
}

.info-box li {
    margin-bottom: 10px;
}

/* MAIN CONTENT */
.main-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
    color: white;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.feature {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

/* TOMBOL CHAT MELAYANG */
.chat-btn {
    position: fixed;
    bottom: 120px;
    left: 10px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primarybot), var(--primary-darkbot));
    color: white;
    border: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    z-index: 1000;
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
    overflow: visible;
}

.chat-btn:hover, .chat-btn:active {
    transform: scale(1.1);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
}

.chat-btn .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--secondarybot);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    pointer-events: none;
}

.chat-btn i {
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* CHATBOT WINDOW */
.mahad-chatbot-window {
    position: fixed;
    bottom: 50px;
    right: 5px;
    width: 330px;
    height: 440px;
    background: var(--whitebot);
    border-radius: 20px;
    font-size:10px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1001;
    animation: mahad-chatbot-slideUp 0.3s ease-out;
}

.mahad-chatbot-window.active {
    display: flex;
}

@keyframes mahad-chatbot-slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CHATBOT HEADER */
.mahad-chatbot-header {
    background: linear-gradient(to right, var(--primarybot), var(--primary-darkbot));
    color: var(--whitebot);
    padding: 5px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 40px;
}

.mahad-chatbot-header-left {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 1;
}

.mahad-chatbot-logo {
    width: 30px;
    height: 30px;
    background: var(--primary-lightbot);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    flex-shrink: 0;
}

.mahad-chatbot-header-info {
    flex: 1;
    min-width: 0;
}

.mahad-chatbot-title {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mahad-chatbot-subtitle {
    font-size: 12px;
    opacity: .9;
}

.mahad-chatbot-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    background: rgba(255,255,255,0.15);
    padding: 5px 10px;
    border-radius: 15px;
    backdrop-filter: blur(5px);
    flex-shrink: 0;
}

.mahad-chatbot-dot {
    width: 8px;
    height: 8px;
    background: var(--successbot);
    border-radius: 50%;
    animation: mahad-chatbot-pulse 2s infinite;
}

@keyframes mahad-chatbot-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* MESSAGES CONTAINER */
.mahad-chatbot-messages-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: var(--light-bgbot);
}

.mahad-chatbot-messages {
    height: 100%;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 12px;
    -webkit-overflow-scrolling: touch;
}
.mahad-chatbot-messages p {
  font-size: 12px;
  line-height: 12px;
  text-align: left;
  margin-bottom: 20px;
  
}


/* MESSAGE BUBBLES */
.mahad-chatbot-message {
    max-width: 85%;
    padding: 12px 15px;
    border-radius: 15px;
    animation: mahad-chatbot-fadeSlide 0.3s ease-out;
    position: relative;
    line-height: 1.4;
    font-size: 10px;
    word-break: break-word;
}

.mahad-chatbot-message.user {
    align-self: flex-end;
    background: var(--primarybot);
    color: var(--whitebot);
    border-bottom-right-radius: 5px;

}

.mahad-chatbot-message.bot {
    align-self: flex-start;
    background: var(--whitebot);
    color: var(--text-darkbot);
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,.1);

    
}

@keyframes mahad-chatbot-fadeSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mahad-chatbot-meta {
    font-size: 11px;
    opacity: .8;
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-weight: 500;
}

/* INPUT AREA */
.mahad-chatbot-input-area {
    padding: 12px 10px;
    border-top: 1px solid var(--gray-lightbot);
    background: var(--whitebot);
    position: sticky;
    bottom: 0;
    z-index: 100;
}

.mahad-chatbot-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--light-bgbot);
    border-radius: 25px;
    padding: 5px 5px 5px 15px;
    border: 1px solid var(--gray-lightbot);
    transition: all 0.3s ease;
}

.mahad-chatbot-input-wrapper:focus-within {
    border-color: var(--primarybot);
    box-shadow: 0 0 0 2px rgba(26, 92, 72, 0.2);
}

.mahad-chatbot-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    outline: none;
    font-family: 'Poppins', sans-serif;
    padding: 10px 0;
    line-height: 1.4;
    min-height: 24px;
}

.mahad-chatbot-send-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    border: none;
    background: var(--primarybot);
    color: var(--whitebot);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    transition: all 0.2s;
    margin-left: 5px;
}

.mahad-chatbot-send-btn:hover {
    background: var(--primary-darkbot);
    transform: scale(1.05);
}

.mahad-chatbot-send-btn:active {
    transform: scale(0.95);
}

.mahad-chatbot-send-btn:disabled {
    background: var(--gray-lightbot);
    cursor: not-allowed;
    transform: none;
}

/* TYPING INDICATOR */
.mahad-chatbot-typing {
    display: block;
    align-self: flex-start;
    background: var(--whitebot);
    padding: 12px 15px;
    border-radius: 15px;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,.1);
    margin-bottom: 5px;
    width: fit-content;
    animation: mahad-chatbot-fadeSlide 0.3s ease-out;
}

.mahad-chatbot-typing-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mahad-chatbot-typing-dots {
    display: flex;
    gap: 4px;
}

.mahad-chatbot-typing-dot {
    width: 6px;
    height: 6px;
    background: var(--text-lightbot);
    border-radius: 50%;
    animation: mahad-chatbot-typing 1.4s infinite ease-in-out both;
}

.mahad-chatbot-typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

.mahad-chatbot-typing-dot:nth-child(3) {
    animation-delay: -0.32s;
}

@keyframes mahad-chatbot-typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.mahad-chatbot-typing-text {
    font-size: 12px;
    color: var(--text-lightbot);
    font-weight: 500;
}

/* FOOTER */
.mahad-chatbot-footer {
    text-align: center;
    font-size: 11px;
    padding: 10px;
    background: var(--light-bgbot);
    color: var(--text-lightbot);
    border-top: 1px solid var(--gray-lightbot);
}

/* WHATSAPP BUTTON */
.mahad-chatbot-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--whatsappbot);
    color: white !important;
    padding: 8px 10px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 300;
    margin: 15px 0;
    font-size: 14px;
    width: fit-content;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.mahad-chatbot-whatsapp-btn:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.mahad-chatbot-whatsapp-btn i {
    font-size: 16px;
}


