/* Entel Chatbots - Layout Styles */

/* Base container for floating mode */
.entel-chatbot {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: -0.02em;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
}

/* Chat Launcher Button */
.chatbot-launcher {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #2271b1;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 24px;
    position: relative;
    overflow: hidden;
}

.chatbot-launcher::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.05) 100%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chatbot-launcher:hover::before {
    opacity: 1;
}

.chatbot-launcher:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.chatbot-launcher img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

/* Chat Modal */
.chatbot-modal {
    position: fixed;
    bottom: 90px;
    left: 20px;
    right: 20px;
    height: 600px;
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.chatbot-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Chat Header */
.chatbot-header {
    background-color: #2271b1;
    color: white;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 36px;
}

.chatbot-header .header-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-header .header-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
}

.chatbot-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-close {
    background: #7B68EE;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
    padding: 6px 8px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    font-weight: bold;
}

.chatbot-close:hover {
    background-color: #6A5ACD;
    opacity: 0.9;
}

/* Chat Summary */
.chat-summary {
    padding: 10px 20px;
    background: #ffffff;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 20px;
}

.chat-summary-title {
    font-size: 14px;
    font-weight: 600;
    color: #24292f;
    letter-spacing: -0.01em;
    flex: 1;
    margin-right: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-summary-date {
    font-size: 11px;
    color: #666;
    font-family: monospace;
    opacity: 0.8;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Chat Input Area */
.chat-input-area {
    padding: 16px;
    border-top: 1px solid #e1e5e9;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
}

.chat-input-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border: 2px solid #000000;
    border-radius: 20px;
    padding: 8px 12px;
    transition: border-color 0.2s ease;
}

.chat-input-container:focus-within {
    border-color: #000000;
    outline: none;
    box-shadow: none;
}

.message-input {
    flex: 1;
    border: 1px solid var(--entel-input-field-inner-border, transparent);
    border-radius: 4px;
    padding: 10px 4px;
    font-size: 14px;
    letter-spacing: -0.01em;
    outline: none;
    resize: none;
    max-height: 80px;
    min-height: 20px;
    line-height: 1.4;
    overflow-y: hidden;
    font-family: inherit;
    background: transparent;
    color: #000000;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s ease;
}

.message-input:focus {
    border-color: var(--entel-input-field-inner-focus-border, transparent) !important;
}

.message-input::placeholder {
    color: #999;
    opacity: 0.8;
}

.send-button,
.stop-button,
.enhancement-button {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    color: white;
    width: var(--entel-input-button-size, 32px);
    height: var(--entel-input-button-size, 32px);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: var(--entel-input-icon-size, 16px);
    flex-shrink: 0;
    padding: 0 !important;
    margin: 0;
}

.send-button:hover,
.stop-button:hover,
.enhancement-button:hover {
    opacity: 0.8;
}

.send-button:disabled {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    cursor: not-allowed;
    opacity: 0.3;
}

.stop-button {
    display: none;
}


.enhancement-button.active {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Chat Footer */
.chat-footer {
    padding: 8px 20px;
    text-align: center;
    font-size: 11px;
    color: #666;
    background: #f9f9f9;
    border-top: 1px solid #eee;
}

/* ===================================
   INLINE CHATBOT STYLES
   =================================== */

.entel-chatbot-inline {
    position: relative !important;
    bottom: auto !important;
    right: auto !important;
    width: 100% !important;
    margin: 0 auto !important;
    z-index: auto !important;
    letter-spacing: -0.02em;
}

.chatbot-inline-container {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-height: 500px;
    max-height: 600px;
    display: flex;
    flex-direction: column;
}

.chatbot-inline-header {
    background: linear-gradient(135deg, #2271b1 0%, #1e5a8a 100%);
    color: white;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.chatbot-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 16px;
}

.chatbot-header-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.chatbot-header-icon-default {
    font-size: 24px;
    line-height: 1;
}

.chatbot-header-actions {
    position: relative;
}

.chatbot-inline-input {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #e1e5e9;
}

.chatbot-inline-input .input-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 2px solid #000000;
    border-radius: 20px;
    padding: 8px 12px;
    transition: border-color 0.2s ease;
}

.chatbot-inline-input .input-container:focus-within {
    border-color: #000000;
    outline: none;
    box-shadow: none;
}

.chatbot-inline-input .message-input {
    flex: 1;
    border: 1px solid var(--entel-input-field-inner-border, transparent);
    border-radius: 4px;
    background: transparent;
    resize: none;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    letter-spacing: -0.01em;
    padding: 8px 4px;
    max-height: 120px;
    color: #000000;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s ease;
}

.chatbot-inline-input .send-button,
.chatbot-inline-input .stop-button,
.chatbot-inline-input .enhancement-button {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    color: white;
    border-radius: 50%;
    width: var(--entel-input-button-size, 36px);
    height: var(--entel-input-button-size, 36px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--entel-input-icon-size, 16px);
    transition: all 0.2s;
    flex-shrink: 0;
    padding: 0 !important;
    margin: 0;
}

.chatbot-inline-input .enhancement-button {
    font-size: var(--entel-input-icon-size, 14px);
}

.chatbot-inline-input .send-button:hover,
.chatbot-inline-input .enhancement-button:hover {
    transform: scale(1.05);
}


.chatbot-inline-input .stop-button:hover {
    opacity: 0.8;
}

.chatbot-inline-footer {
    padding: 12px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e1e5e9;
    font-size: 12px;
    color: #666;
    text-align: center;
}
