/* ============================================
   Footer Styles
   ============================================ */

/* Footer Base */
.site-footer {
    background: #fafafa;
    border-top: 1px solid var(--border);
    margin-top: 80px;
    padding: 60px 0 20px 0;
}

/* Footer Grid */
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo {
    margin-bottom: 16px;
}

.footer-logo img {
    height: 24px;
    width: auto;
}

.footer-logo h3 {
    font-size: 16px;
    margin: 0;
    color: var(--primary);
}

/* Footer Columns */
.footer-column h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text);
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    margin-bottom: 10px;
}

.footer-column a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-column a:hover {
    color: var(--primary) !important;
}

/* Business Info */
.footer-business-info {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 30px;
}

.footer-business-info-content {
    color: #888;
    font-size: 12px;
    line-height: 1.8;
}

.footer-info-row {
    margin-bottom: 10px;
}

.footer-info-label {
    font-weight: 600;
    color: var(--text);
}

.footer-info-separator {
    margin: 0 8px;
    color: #ddd;
}

/* Copyright */
.footer-copyright {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid var(--border);
}

.footer-copyright p {
    color: var(--text-light);
    font-size: 13px;
    margin: 0;
}

/* ============================================
   Messages Modal
   ============================================ */

.messages-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.messages-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    height: 80vh;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.messages-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.messages-modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.messages-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
}

.messages-modal-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.conversations-list {
    width: 320px;
    border-right: 1px solid var(--border);
    overflow-y: auto;
}

.conversations-container {
    padding: 12px;
}

.conversations-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.conversations-placeholder-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.conversation-detail {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.conversation-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-light);
}

.conversation-placeholder-content {
    text-align: center;
}

.conversation-placeholder-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.conversation-messages-area {
    display: none;
    flex: 1;
    flex-direction: column;
}

.conversation-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.conversation-title {
    font-weight: 600;
    font-size: 16px;
}

.conversation-subtitle {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 4px;
}

.conversation-messages-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.conversation-input-area {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
}

.conversation-input-area input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 24px;
    outline: none;
}

.conversation-input-area button {
    border-radius: 24px;
    padding: 10px 24px;
}

/* ============================================
   Permission Request Modal
   ============================================ */

.permission-modal {
    display: none;
}

.permission-modal-content {
    text-align: center;
    padding: 40px;
}

.permission-modal-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.permission-modal-content h2 {
    margin-bottom: 12px;
}

.permission-modal-description {
    color: #666;
    margin-bottom: 24px;
}

/* ============================================
   Floating Chatbot
   ============================================ */

#floating-chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9998;
}

.chatbot-float-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.chatbot-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(248, 56, 75, 0.5);
}

.chatbot-icon,
.chatbot-close-icon {
    font-size: 28px;
    position: absolute;
    transition: opacity 0.2s;
}

.chatbot-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

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

.chatbot-window-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 16px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.chatbot-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-avatar {
    font-size: 24px;
}

.chatbot-title {
    font-weight: 600;
    font-size: 15px;
}

.chatbot-status {
    font-size: 12px;
    opacity: 0.9;
}

.chatbot-minimize-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: background 0.2s;
}

.chatbot-minimize-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chatbot-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chatbot-message {
    display: flex;
    gap: 8px;
    animation: fadeIn 0.3s ease;
}

.chatbot-message.user {
    flex-direction: row-reverse;
}

.chatbot-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.chatbot-msg-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 14px;
    line-height: 1.4;
    font-size: 14px;
    word-wrap: break-word;
}

.chatbot-message.bot .chatbot-msg-bubble {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
}

.chatbot-message.user .chatbot-msg-bubble {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.chatbot-typing {
    display: flex;
    gap: 8px;
}

.chatbot-typing-dots {
    display: flex;
    gap: 4px;
    padding: 10px 14px;
    background: white;
    border-radius: 14px;
    border-bottom-left-radius: 4px;
}

.chatbot-typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #999;
    animation: typing 1.4s infinite;
}

.chatbot-typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.chatbot-typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-8px);
    }
}

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

.chatbot-input-area {
    padding: 12px;
    background: white;
    border-top: 1px solid #e1e4e8;
    display: flex;
    gap: 8px;
    border-radius: 0 0 16px 16px;
}

.chatbot-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e1e4e8;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
}

.chatbot-input:focus {
    border-color: var(--primary);
}

.chatbot-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s;
}

.chatbot-send-btn:hover {
    transform: scale(1.1);
}

.chatbot-send-btn:active {
    transform: scale(0.95);
}

/* Scrollbar */
.chatbot-messages::-webkit-scrollbar {
    width: 5px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    /* Messages Modal */
    .messages-modal-content {
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: 0 !important;
    }

    /* Chatbot */
    .chatbot-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 120px);
        bottom: 80px;
        right: 20px;
        left: 20px;
    }

    #floating-chatbot-container {
        bottom: 15px;
        right: 15px;
    }
}
