/* ============================================
   CHATBOT WIDGET
   ============================================ */

.chatbot-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.4);
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(0, 212, 255, 0.4);
    }
    50% {
        box-shadow: 0 8px 32px rgba(0, 212, 255, 0.6);
    }
}

.chatbot-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 212, 255, 0.5);
}

.chatbot-toggle-icon {
    font-size: 1.5rem;
}

.chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    height: 600px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.chatbot-widget.open {
    display: flex;
    transform: translateY(0);
}

.chatbot-widget.minimized {
    display: none;
}

.chatbot-header {
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    color: white;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.chatbot-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.chatbot-avatar {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.chatbot-header-text h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
}

.chatbot-header-text p {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.9;
}

.chatbot-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.chatbot-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #f8fafc;
}

.chatbot-welcome {
    text-align: center;
    padding: 1.25rem 0.75rem;
    background: white;
    border-radius: 16px;
    margin-bottom: 0.75rem;
}

.welcome-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.chatbot-welcome h3 {
    margin: 0 0 0.75rem 0;
    color: #1a1a2e;
    font-size: 1.25rem;
}

.chatbot-welcome p {
    color: #64748b;
    margin: 0 0 1rem 0;
    line-height: 1.5;
    font-size: 0.9375rem;
}

.btn-start-chat {
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.btn-start-chat:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.quick-action-btn {
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 0.625rem 0.875rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.chatbot-message {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    animation: fadeIn 0.3s ease;
}

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

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

.chatbot-message.user .message-content {
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    color: white;
}

.chatbot-message.assistant .message-content {
    background: white;
    color: #1a1a2e;
    border: 1px solid #e2e8f0;
}

.message-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.message-content {
    max-width: 75%;
    padding: 0.625rem 0.875rem;
    border-radius: 12px;
    font-size: 0.875rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.message-content a {
    color: #00d4ff;
    text-decoration: underline;
}

.typing {
    opacity: 0.7;
}

.typing-dots {
    display: flex;
    gap: 4px;
    padding: 0.5rem 0;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #64748b;
    border-radius: 50%;
    animation: typing 1.4s ease-in-out infinite;
}

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

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

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

.chatbot-input-container {
    padding: 1rem;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 0.5rem;
}

.chatbot-input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.9375rem;
    outline: none;
    transition: all 0.3s ease;
}

.chatbot-input:focus {
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.chatbot-send-btn {
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.chatbot-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.chatbot-footer {
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    font-size: 0.8125rem;
    color: #64748b;
}

.chatbot-footer a {
    color: #00d4ff;
    text-decoration: none;
    font-weight: 600;
}

.chatbot-footer a:hover {
    text-decoration: underline;
}

/* Formulario de información */
.chatbot-form-container {
    background: white;
    border-radius: 16px;
    padding: 1rem;
    margin-top: 0.5rem;
    border: 2px solid #00d4ff;
}

.form-header {
    margin-bottom: 1rem;
}

.form-header h4 {
    margin: 0 0 0.5rem 0;
    color: #1a1a2e;
    font-size: 1.125rem;
}

.form-header p {
    margin: 0;
    color: #64748b;
    font-size: 0.875rem;
}

.chatbot-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
}

.form-row {
    display: grid;
    grid-template-columns: 0.9fr 1.6fr;
    gap: 0.75rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a2e;
}

.form-group input,
.form-group select {
    padding: 0.625rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    outline: none;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.form-group input[type="tel"] {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.btn-submit-form {
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 0.875rem;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.25rem;
    width: 100%;
}

.btn-submit-form:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.3);
}

.btn-submit-form:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Opciones de pago */
.chatbot-payment-option {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #22c55e;
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.payment-option-content h4 {
    margin: 0 0 0.5rem 0;
    color: #166534;
    font-size: 1.125rem;
}

.payment-option-content p {
    margin: 0 0 1rem 0;
    color: #15803d;
    font-size: 0.9375rem;
}

.payment-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-payment,
.btn-info {
    padding: 0.875rem 1.25rem;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-payment {
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    color: white;
}

.btn-payment:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.3);
}

.btn-info {
    background: white;
    color: #1a1a2e;
    border: 2px solid #e2e8f0;
}

.btn-info:hover {
    border-color: #00d4ff;
    background: #f8fafc;
}

/* Modal WhatsApp */
.chatbot-whatsapp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.chatbot-whatsapp-modal.active {
    display: flex;
}

.whatsapp-modal-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.whatsapp-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    color: #64748b;
    transition: all 0.3s ease;
}

.whatsapp-modal-close:hover {
    background: #e2e8f0;
    color: #1a1a2e;
}

.whatsapp-modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.whatsapp-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.whatsapp-modal-header h3 {
    margin: 0;
    color: #1a1a2e;
    font-size: 1.5rem;
}

.whatsapp-modal-body {
    text-align: center;
}

.whatsapp-modal-body p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.whatsapp-info {
    background: #f8fafc;
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    text-align: left;
}

.whatsapp-info p {
    margin: 0.5rem 0;
    color: #1a1a2e;
}

.whatsapp-link-btn {
    display: inline-block;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.0625rem;
    transition: all 0.3s ease;
}

.whatsapp-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.3);
}

/* Responsive */
@media (max-width: 640px) {
    .chatbot-widget {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
    
    .chatbot-toggle {
        bottom: 15px;
        right: 15px;
        padding: 0.875rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .chatbot-toggle-text {
        display: none;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   PLANES Y COTIZACIONES
   ============================================ */

.chatbot-plans-selection {
    margin: 1rem 0;
    animation: fadeIn 0.3s ease;
}

.plans-selection-content {
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.plans-selection-content h4 {
    margin: 0 0 0.5rem 0;
    color: #1a1a2e;
    font-size: 1.125rem;
    font-weight: 700;
}

.plans-selection-content > p {
    margin: 0 0 1rem 0;
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.5;
}

.plans-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.plan-card {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.plan-card:hover {
    border-color: #00d4ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.2);
}

.plan-header {
    margin-bottom: 0.75rem;
}

.plan-header h5 {
    margin: 0 0 0.5rem 0;
    color: #1a1a2e;
    font-size: 1rem;
    font-weight: 700;
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.plan-price .currency {
    font-size: 1.25rem;
    font-weight: 700;
    color: #00d4ff;
}

.plan-price .amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a2e;
}

.plan-price .period {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.plan-description {
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0.5rem 0;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0;
}

.plan-features li {
    padding: 0.375rem 0;
    color: #475569;
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.plan-features li:before {
    content: "✓";
    color: #00d4ff;
    font-weight: 700;
    flex-shrink: 0;
}

.btn-select-plan {
    width: 100%;
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 0.875rem 1.25rem;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.btn-select-plan:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.plans-note {
    margin: 1rem 0 0 0;
    padding: 0.75rem;
    background: #f0f9ff;
    border-radius: 8px;
    color: #0369a1;
    font-size: 0.8125rem;
    text-align: center;
}

.chatbot-quote-option {
    margin: 1rem 0;
    animation: fadeIn 0.3s ease;
}

.quote-option-content {
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.quote-option-content h4 {
    margin: 0 0 0.5rem 0;
    color: #1a1a2e;
    font-size: 1.125rem;
    font-weight: 700;
}

.quote-option-content > p {
    margin: 0 0 1rem 0;
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.5;
}

.quote-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.btn-quote {
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    color: white;
    padding: 0.875rem 1.25rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9375rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.btn-quote:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.quote-note {
    margin: 0.75rem 0 0 0;
    padding: 0.75rem;
    background: #f0f9ff;
    border-radius: 8px;
    color: #0369a1;
    font-size: 0.8125rem;
    text-align: center;
}

@media (max-width: 640px) {
    .plans-grid {
        grid-template-columns: 1fr;
    }
}

