/* Liquid Renovations Chatbot - Frontend Styles */

/* Chat Button */
.lr-chatbot-button {
    position: fixed;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--lr-primary-color, #0066cc);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 24px;
}

.lr-chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.lr-chatbot-button.bottom-right {
    bottom: 20px;
    right: 20px;
}

.lr-chatbot-button.bottom-left {
    bottom: 20px;
    left: 20px;
}

.lr-chatbot-button.top-right {
    top: 20px;
    right: 20px;
}

.lr-chatbot-button.top-left {
    top: 20px;
    left: 20px;
}

/* Chat Window */
.lr-chatbot-window {
    position: fixed;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 100px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.lr-chatbot-window.active {
    display: flex;
}

.lr-chatbot-window.bottom-right {
    bottom: 90px;
    right: 20px;
}

.lr-chatbot-window.bottom-left {
    bottom: 90px;
    left: 20px;
}

.lr-chatbot-window.top-right {
    top: 90px;
    right: 20px;
}

.lr-chatbot-window.top-left {
    top: 90px;
    left: 20px;
}

/* Chat Header */
.lr-chatbot-header {
    background: var(--lr-primary-color, #0066cc);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lr-chatbot-header-content h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
}

.lr-chatbot-header-content p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

.lr-chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.lr-chatbot-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Chat Body */
.lr-chatbot-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

/* Quick Actions */
.lr-chatbot-quick-actions {
    margin-bottom: 20px;
}

.lr-chatbot-quick-actions h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

.lr-chatbot-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lr-chatbot-action-btn {
    background: white;
    border: 1px solid #e0e0e0;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lr-chatbot-action-btn:hover {
    border-color: var(--lr-primary-color, #0066cc);
    background: #f0f7ff;
}

.lr-chatbot-action-btn-icon {
    font-size: 18px;
}

/* Contact Form */
.lr-chatbot-form {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.lr-chatbot-form h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

.lr-chatbot-form-group {
    margin-bottom: 15px;
}

.lr-chatbot-form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

.lr-chatbot-form-group input,
.lr-chatbot-form-group textarea,
.lr-chatbot-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.lr-chatbot-form-group input:focus,
.lr-chatbot-form-group textarea:focus,
.lr-chatbot-form-group select:focus {
    outline: none;
    border-color: var(--lr-primary-color, #0066cc);
}

.lr-chatbot-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.lr-chatbot-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.lr-chatbot-security-question {
    background: #fff8dc;
    border: 1px solid #ffd700;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.lr-chatbot-security-question p {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

/* Honeypot - hidden field */
.lr-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.lr-chatbot-submit-btn {
    width: 100%;
    padding: 12px;
    background: var(--lr-primary-color, #0066cc);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.lr-chatbot-submit-btn:hover {
    background: #0052a3;
}

.lr-chatbot-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Messages */
.lr-chatbot-message {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
}

.lr-chatbot-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.lr-chatbot-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Info Section */
.lr-chatbot-info {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-top: 15px;
}

.lr-chatbot-info h4 {
    margin: 0 0 12px 0;
    font-size: 15px;
    color: #333;
}

.lr-chatbot-info p {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.lr-chatbot-info ul {
    margin: 8px 0;
    padding-left: 20px;
}

.lr-chatbot-info li {
    margin-bottom: 5px;
    font-size: 13px;
    color: #666;
}

/* Loading State */
.lr-chatbot-loading {
    display: none;
    text-align: center;
    padding: 10px;
}

.lr-chatbot-loading.active {
    display: block;
}

.lr-chatbot-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--lr-primary-color, #0066cc);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: lr-spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes lr-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notification Badge */
.lr-chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .lr-chatbot-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 80px);
        bottom: 10px !important;
        right: 10px !important;
        left: 10px !important;
        top: auto !important;
    }
    
    .lr-chatbot-button {
        bottom: 10px !important;
        right: 10px !important;
    }
    
    .lr-chatbot-form-row {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar Styling */
.lr-chatbot-body::-webkit-scrollbar {
    width: 6px;
}

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

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

.lr-chatbot-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}
