/* ========================================
   CHATBOT STYLES - J A RENOVATIONS & HOME IMPROVEMENTS
   Brand colors: #000000 (black), #F2780C (orange), #FFFFFF (white), #0F5FA6 (blue)
   ======================================== */

* {
    box-sizing: border-box !important;
}

html #dcg-bot-launcher,
#dcg-bot-launcher {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    width: 60px !important;
    height: 60px !important;
    background: linear-gradient(135deg, #F2780C 0%, #c75f08 100%) !important;
    border-radius: 50% !important;
    box-shadow: 0 6px 20px rgba(242, 120, 12, 0.35) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    z-index: 99999 !important;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    font-size: 26px !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    top: auto !important;
    left: auto !important;
}

html #dcg-bot-launcher:hover,
#dcg-bot-launcher:hover {
    transform: scale(1.15) !important;
    background: linear-gradient(135deg, #c75f08 0%, #0F5FA6 100%) !important;
    box-shadow: 0 8px 25px rgba(242, 120, 12, 0.45) !important;
}

html #dcg-bot-launcher:active,
#dcg-bot-launcher:active {
    transform: scale(0.95) !important;
}

/* Ventana del Chat */
html #dcg-bot-window,
#dcg-bot-window {
    position: fixed !important;
    bottom: 90px !important;
    right: 20px !important;
    width: 380px !important;
    height: 550px !important;
    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2) !important;
    display: none !important;
    flex-direction: column !important;
    overflow: hidden !important;
    z-index: 99999 !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    border: 1px solid #e0e0e0 !important;
    margin: 0 !important;
    padding: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    top: auto !important;
    left: auto !important;
}

/* El header */
html #dcg-bot-window .dcg-bot-header,
#dcg-bot-window .dcg-bot-header,
.dcg-bot-header {
    background: linear-gradient(135deg, #000000 0%, #0F5FA6 100%) !important;
    color: white !important;
    padding: 18px !important;
    font-weight: 600 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 4px solid #F2780C !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
}

html #dcg-bot-window .dcg-bot-header span,
#dcg-bot-window .dcg-bot-header span,
.dcg-bot-header span {
    font-size: 16px !important;
    font-weight: bold !important;
    letter-spacing: 0.5px !important;
    color: white !important;
}

#dcg-header-content {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex: 1 !important;
}

#dcg-logo {
    height: 30px !important;
    object-fit: contain !important;
}

/* Language Switcher */
html .lang-switcher,
.lang-switcher {
    display: flex !important;
    gap: 8px !important;
    margin-left: auto !important;
}

html .lang-btn,
.lang-btn {
    padding: 6px 12px !important;
    background: rgba(242, 120, 12, 0.2) !important;
    color: white !important;
    border: 1.5px solid rgba(242, 120, 12, 0.5) !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 11px !important;
    font-weight: bold !important;
    transition: all 0.25s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

html .lang-btn:hover,
.lang-btn:hover {
    background: rgba(242, 120, 12, 0.35) !important;
    border-color: rgba(242, 120, 12, 0.7) !important;
    transform: translateY(-2px) !important;
}

html .lang-btn.active,
.lang-btn.active {
    background: #F2780C !important;
    color: #ffffff !important;
    border-color: #F2780C !important;
    box-shadow: 0 4px 10px rgba(242, 120, 12, 0.4) !important;
}

/* Cuerpo del chat / Formulario */
html #dcg-bot-window .dcg-bot-body,
#dcg-bot-window .dcg-bot-body,
.dcg-bot-body {
    flex: 1 !important;
    padding: 20px !important;
    overflow: hidden !important;
    background: #f8f9fa !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
}

html .dcg-bot-body p,
.dcg-bot-body p {
    margin: 0 0 10px 0 !important;
    font-size: 14px !important;
    color: #333 !important;
    line-height: 1.5 !important;
}

html .dcg-bot-input-group,
.dcg-bot-input-group {
    margin-bottom: 15px !important;
}

html .dcg-bot-input-group label,
.dcg-bot-input-group label {
    display: block !important;
    font-size: 12px !important;
    margin-bottom: 6px !important;
    font-weight: 600 !important;
    color: #555 !important;
}

html .dcg-bot-input-group input,
.dcg-bot-input-group input {
    width: 100% !important;
    padding: 12px 15px !important;
    border: 2px solid #ddd !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    transition: all 0.3s ease !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    background: white !important;
}

html .dcg-bot-input-group input:focus,
.dcg-bot-input-group input:focus {
    outline: none !important;
    border-color: #F2780C !important;
    box-shadow: 0 0 0 3px rgba(242, 120, 12, 0.15) !important;
}

html .dcg-bot-input-group input::placeholder,
.dcg-bot-input-group input::placeholder {
    color: #999 !important;
}

html .dcg-bot-submit,
.dcg-bot-submit {
    width: 100% !important;
    padding: 13px !important;
    background: linear-gradient(135deg, #000000 0%, #0F5FA6 100%) !important;
    color: #F2780C !important;
    border: 2px solid #F2780C !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

html .dcg-bot-submit:hover,
.dcg-bot-submit:hover {
    background: linear-gradient(135deg, #F2780C 0%, #c75f08 100%) !important;
    color: #ffffff !important;
    border-color: #F2780C !important;
    box-shadow: 0 6px 16px rgba(242, 120, 12, 0.35) !important;
    transform: translateY(-2px) !important;
}

html .dcg-bot-submit:active,
.dcg-bot-submit:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(242, 120, 12, 0.2) !important;
}

/* Quick Question Buttons */
html .quick-questions,
.quick-questions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin-top: 15px !important;
}

html .quick-btn,
.quick-btn {
    padding: 12px 14px !important;
    background: linear-gradient(135deg, #000000 0%, #0F5FA6 100%) !important;
    color: white !important;
    border: 2px solid #000000 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    transition: all 0.25s ease !important;
    text-align: center !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    text-transform: capitalize !important;
    line-height: 1.4 !important;
}

html .quick-btn:hover,
.quick-btn:hover {
    background: linear-gradient(135deg, #F2780C 0%, #c75f08 100%) !important;
    border-color: #F2780C !important;
    color: #ffffff !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 16px rgba(242, 120, 12, 0.3) !important;
}

html .quick-btn:active,
.quick-btn:active {
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 6px rgba(242, 120, 12, 0.2) !important;
}

/* Bot Messages */
html .bot-message,
.bot-message {
    background: white !important;
    padding: 14px 16px !important;
    border-radius: 10px !important;
    margin-bottom: 12px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
    border-left: 4px solid #F2780C !important;
}

html .bot-message p,
.bot-message p {
    margin: 0 0 10px 0 !important;
    font-size: 13px !important;
    color: #333 !important;
    line-height: 1.6 !important;
}

html .bot-message p:last-child,
.bot-message p:last-child {
    margin-bottom: 0 !important;
}

/* Chat Messages Container */
html #chat-messages,
#chat-messages {
    flex: 1 !important;
    overflow-y: auto !important;
    margin-bottom: 10px !important;
    display: flex !important;
    flex-direction: column !important;
    scrollbar-width: thin !important;
    scrollbar-color: #ccc #f8f9fa !important;
}

html #dcg-chat-inputs,
#dcg-chat-inputs {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

html #dcg-input-wrapper,
#dcg-input-wrapper {
    display: flex !important;
    gap: 8px !important;
    align-items: stretch !important;
}

#chat-messages::-webkit-scrollbar {
    width: 6px !important;
    display: block !important;
}

#chat-messages::-webkit-scrollbar-track {
    background: #f8f9fa !important;
    border-radius: 10px !important;
}

#chat-messages::-webkit-scrollbar-thumb {
    background: #F2780C !important;
    border-radius: 10px !important;
}

#chat-messages::-webkit-scrollbar-thumb:hover {
    background: #c75f08 !important;
}

/* User message styling (matches inline style set from main.js) */
div[style*="background: #4CAF50"] {
    background: linear-gradient(135deg, #0F5FA6 0%, #0b4779 100%) !important;
    color: white !important;
    border-radius: 10px !important;
    padding: 12px 14px !important;
    margin: 10px 0 !important;
    text-align: right !important;
    box-shadow: 0 2px 6px rgba(15, 95, 166, 0.25) !important;
}

/* Input y botón de envío */
html #user-msg,
#user-msg {
    flex: 1 !important;
    padding: 12px 15px !important;
    border: 2px solid #ddd !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    transition: all 0.3s ease !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    background: white !important;
}

html #user-msg:focus,
#user-msg:focus {
    outline: none !important;
    border-color: #F2780C !important;
    box-shadow: 0 0 0 3px rgba(242, 120, 12, 0.15) !important;
}

html #send-btn,
#send-btn {
    padding: 12px 15px !important;
    background: linear-gradient(135deg, #0F5FA6 0%, #0b4779 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-size: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(15, 95, 166, 0.25) !important;
}

html #send-btn:hover,
#send-btn:hover {
    background: linear-gradient(135deg, #0b4779 0%, #08365a 100%) !important;
    box-shadow: 0 4px 12px rgba(15, 95, 166, 0.35) !important;
    transform: translateY(-2px) !important;
}

html #send-btn:active,
#send-btn:active {
    transform: translateY(0) !important;
}

html #wa-btn,
#wa-btn {
    padding: 12px !important;
    background: linear-gradient(135deg, #25D366 0%, #20BA58 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.2) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

html #wa-btn:hover,
#wa-btn:hover {
    background: linear-gradient(135deg, #20BA58 0%, #1DA851 100%) !important;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3) !important;
    transform: translateY(-2px) !important;
}

html #wa-btn:active,
#wa-btn:active {
    transform: translateY(0) !important;
}

/* Responsive */
@media (max-width: 480px) {
    html #dcg-bot-window,
    #dcg-bot-window {
        width: calc(100vw - 30px) !important;
        height: 85vh !important;
        max-height: 600px !important;
        right: 15px !important;
        bottom: 80px !important;
    }

    html .dcg-bot-header,
    .dcg-bot-header {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    html .lang-switcher,
    .lang-switcher {
        margin-left: 0 !important;
        width: 100% !important;
    }

    html .quick-btn,
    .quick-btn {
        font-size: 11px !important;
        padding: 10px 12px !important;
    }

    html .quick-questions,
    .quick-questions {
        grid-template-columns: 1fr !important;
    }
}

/* Font imports */
@import url('https://fonts.googleapis.com/css2?family=Segoe+UI:wght@400;600;700&display=swap');
