/* בוט ניווט חכם - עיצוב */
:root {
    --chatbot-primary: #0070f3;
    --chatbot-primary-dark: #0050d0;
    --chatbot-secondary: #64748b;
    --chatbot-success: #22c55e;
    --chatbot-warning: #eab308;
    --chatbot-danger: #ef4444;
    --chatbot-white: #ffffff;
    --chatbot-light: #f8fafc;
    --chatbot-dark: #1e293b;
    --chatbot-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --chatbot-shadow-lg: 0 20px 40px -4px rgba(0, 0, 0, 0.15);
}

/* כפתור הפתיחה */
.chatbot-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--chatbot-primary), #00c6ff);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    box-shadow: var(--chatbot-shadow);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--chatbot-shadow-lg);
}

.chatbot-toggle.active {
    background: var(--chatbot-danger);
}

/* חלונית הבוט */
.chatbot-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    height: 600px;
    background: var(--chatbot-white);
    border-radius: 20px;
    box-shadow: var(--chatbot-shadow-lg);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-container.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* כותרת הבוט */
.chatbot-header {
    background: linear-gradient(135deg, var(--chatbot-primary), #00c6ff);
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
}

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

.chatbot-header p {
    margin: 5px 0 0 0;
    font-size: 14px;
    opacity: 0.9;
}

.chatbot-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

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

/* אזור השיחה */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--chatbot-light);
    scrollbar-width: thin;
    scrollbar-color: var(--chatbot-primary) transparent;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

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

.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--chatbot-primary);
    border-radius: 3px;
}

/* הודעות */
.chatbot-message {
    margin-bottom: 15px;
    animation: fadeInUp 0.3s ease;
}

.message-bot {
    text-align: right;
}

.message-user {
    text-align: left;
}

.message-content {
    display: inline-block;
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
}

.message-bot .message-content {
    background: white;
    color: var(--chatbot-dark);
    border-bottom-right-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.message-user .message-content {
    background: var(--chatbot-primary);
    color: white;
    border-bottom-left-radius: 6px;
}

/* כפתורי אפשרויות */
.chatbot-options {
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chatbot-option {
    background: white;
    border: 2px solid var(--chatbot-primary);
    color: var(--chatbot-primary);
    padding: 10px 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    text-align: center;
    font-weight: 500;
}

.chatbot-option:hover {
    background: var(--chatbot-primary);
    color: white;
    transform: translateY(-1px);
}

/* אזור הקלט */
.chatbot-input-area {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.chatbot-input {
    flex: 1;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 15px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

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

.chatbot-send {
    background: var(--chatbot-primary);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chatbot-send:hover {
    background: var(--chatbot-primary-dark);
    transform: scale(1.05);
}

.chatbot-send:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

/* טיפינג אנימציה */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 10px 0;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--chatbot-secondary);
    border-radius: 50%;
    animation: typingPulse 1.4s infinite ease-in-out;
}

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

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

/* טפסי מידע */
.chatbot-form {
    background: white;
    padding: 15px;
    border-radius: 12px;
    margin: 10px 0;
    border: 1px solid #e2e8f0;
}

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

.chatbot-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--chatbot-dark);
    font-size: 14px;
}

.chatbot-form input,
.chatbot-form textarea,
.chatbot-form select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

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

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

.chatbot-form .submit-btn {
    background: var(--chatbot-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    width: 100%;
    transition: background 0.2s;
}

.chatbot-form .submit-btn:hover {
    background: var(--chatbot-primary-dark);
}

/* התאמה לדסקטופ - מניעת התנגשות עם התפריט הצדדי */
@media (min-width: 993px) {
    .chatbot-toggle {
        right: 90px; /* 70px רוחב התפריט + 20px רווח */
    }
    
    .chatbot-container {
        right: 90px; /* 70px רוחב התפריט + 20px רווח */
    }
}

/* התאמה לטאבלט */
@media (max-width: 992px) and (min-width: 769px) {
    .chatbot-toggle {
        right: 20px;
        bottom: 20px;
    }
    
    .chatbot-container {
        right: 20px;
        width: 350px;
        height: 550px;
    }
}

/* התאמה למובייל */
@media (max-width: 768px) {
    .chatbot-container {
        width: 100vw;
        height: 100vh;
        bottom: 0;
        right: 0;
        left: 0;
        top: 0;
        border-radius: 0;
        max-height: 100vh;
        transform: translateY(100%);
        z-index: 9999;
        position: fixed;
    }
    
    .chatbot-container.active {
        transform: translateY(0);
    }
    
    /* מניעת גלילה ברקע כשהחלונית פתוחה */
    body.chatbot-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }
    
    .chatbot-toggle {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 22px;
        z-index: 10000;
    }
    
    .chatbot-header {
        padding: 25px 20px;
        border-radius: 0;
        position: sticky;
        top: 0;
        z-index: 10;
        background: linear-gradient(135deg, var(--chatbot-primary), #00c6ff);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .chatbot-header h3 {
        font-size: 20px;
        margin: 0;
    }
    
    .chatbot-header p {
        font-size: 15px;
        margin: 5px 0 0 0;
    }
    
    .chatbot-close {
        position: absolute;
        top: 20px;
        right: 20px;
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .chatbot-messages {
        padding: 20px 15px;
        flex: 1;
        overflow-y: auto;
        background: var(--chatbot-light);
        -webkit-overflow-scrolling: touch;
    }
    
    .chatbot-input-area {
        padding: 20px 15px;
        border-radius: 0;
        position: sticky;
        bottom: 0;
        background: white;
        border-top: 1px solid #e2e8f0;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
        display: flex;
        gap: 10px;
        align-items: center;
    }
    
    .message-content {
        max-width: 85%;
        font-size: 15px;
        padding: 14px 18px;
        line-height: 1.5;
    }
    
    .chatbot-option {
        padding: 14px 18px;
        font-size: 15px;
        margin-bottom: 10px;
        border-radius: 15px;
        font-weight: 500;
    }
    
    .chatbot-form input,
    .chatbot-form textarea {
        font-size: 16px; /* למנוע זום במובייל */
        padding: 14px 16px;
        border-radius: 10px;
        border: 2px solid #e2e8f0;
    }
    
    .chatbot-form input:focus,
    .chatbot-form textarea:focus {
        border-color: var(--chatbot-primary);
        outline: none;
    }
    
    .chatbot-input {
        font-size: 16px;
        padding: 14px 16px;
        flex: 1;
        border: 2px solid #e2e8f0;
        border-radius: 25px;
        outline: none;
    }
    
    .chatbot-input:focus {
        border-color: var(--chatbot-primary);
    }
    
    .chatbot-send {
        width: 48px;
        height: 48px;
        font-size: 18px;
        border-radius: 50%;
        background: var(--chatbot-primary);
        color: white;
        border: none;
        cursor: pointer;
        transition: all 0.2s;
        flex-shrink: 0;
    }
    
    .chatbot-send:hover {
        background: var(--chatbot-primary-dark);
        transform: scale(1.05);
    }
    
    .chatbot-send:disabled {
        background: #cbd5e1;
        cursor: not-allowed;
        transform: none;
    }
    
    /* שיפור טפסים במובייל */
    .chatbot-form .form-group {
        margin-bottom: 20px;
    }
    
    .chatbot-form .submit-btn {
        width: 100%;
        padding: 16px;
        font-size: 16px;
        border-radius: 12px;
        font-weight: 600;
    }
    
    /* שיפור אפקטי מעבר */
    .chatbot-container {
        transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    }
    
    /* אנימציה לכפתור הסגירה */
    .chatbot-close:active {
        transform: scale(0.95);
    }
}

/* אנימציות */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typingPulse {
    0%, 80%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* אייקונים במסרים */
.message-icon {
    width: 16px;
    height: 16px;
    margin-left: 5px;
    vertical-align: middle;
}

/* הדגשת קישורים בהודעות */
.message-content a {
    color: inherit;
    text-decoration: underline;
    font-weight: 500;
}

.message-bot .message-content a {
    color: var(--chatbot-primary);
}

.message-user .message-content a {
    color: white;
}

/* סטטוס קישוריות */
.connection-status {
    position: absolute;
    top: 10px;
    left: 15px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--chatbot-success);
    animation: pulse 2s infinite;
}

.connection-status.offline {
    background: var(--chatbot-danger);
    animation: none;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* עיצובים נוספים למפרטי במות */
.lift-specification {
    background: #f8f9ff;
    border: 1px solid #e1e7ff;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
}

.spec-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 15px 0;
}

.spec-item {
    background: white;
    padding: 8px;
    border-radius: 4px;
    border-left: 3px solid #4F46E5;
}

.spec-features, .spec-applications {
    margin: 15px 0;
}

.spec-features ul, .spec-applications ul {
    margin: 5px 0;
    padding-left: 20px;
}

.lift-summary {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px;
    margin: 8px 0;
}

.lift-features {
    color: #6b7280;
    font-size: 0.9em;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

.comparison-table th,
.comparison-table td {
    border: 1px solid #e5e7eb;
    padding: 8px;
    text-align: center;
}

.comparison-table th {
    background: #f9fafb;
    font-weight: bold;
}

.recommendation {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    padding: 12px;
    margin: 10px 0;
}

.consultation-offer {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.contact-details p {
    margin: 8px 0;
}

.business-hours {
    background: #f9fafb;
    padding: 10px;
    border-radius: 6px;
    margin: 10px 0;
}

.service-item {
    margin: 15px 0;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.service-item:last-child {
    border-bottom: none;
}

.models-overview {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
}

.model-category {
    background: white;
    padding: 12px;
    margin: 10px 0;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

.model-category h5 {
    margin: 0 0 8px 0;
    color: #374151;
}

.model-category p {
    margin: 5px 0;
    font-size: 0.9em;
    color: #6b7280;
}

.lift-comparison {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
}

.multiple-lifts {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
}

.recommendations {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
}

.contact-info,
.location-info,
.services-info {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
}

.service-area ul {
    margin: 10px 0;
    padding-left: 20px;
}

.service-area li {
    margin: 5px 0;
}

/* עיצוב חדש לצ'אטבוט */
.chatbot-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

#smart-chatbot {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    height: 600px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform: scale(1);
}

#smart-chatbot.chatbot-hidden {
    transform: scale(0) translateY(100px);
    opacity: 0;
    pointer-events: none;
}

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

.chatbot-controls {
    display: flex;
    gap: 5px;
}

.chatbot-minimize {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

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

.bot-message,
.user-message {
    display: flex;
    gap: 10px;
    animation: messageSlide 0.4s ease;
    margin-bottom: 15px;
}

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

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.bot-message .message-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.user-message .message-content {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-bottom-right-radius: 5px;
}

.bot-message .message-content {
    border-bottom-left-radius: 5px;
}

.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

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

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }
.typing-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes typing {
    0%, 80%, 100% { 
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% { 
        transform: scale(1);
        opacity: 1;
    }
}

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

.chatbot-quick-actions {
    padding: 10px 20px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.quick-action {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

.quick-action:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

#chatbot-input {
    flex: 1;
    border: 1px solid #cbd5e1;
    border-radius: 25px;
    padding: 12px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

#chatbot-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#chatbot-send {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

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

/* מובייל - עיצובים נוספים */
@media (max-width: 768px) {
    .spec-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-table {
        font-size: 0.8em;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 4px;
    }
    
    #smart-chatbot {
        bottom: 80px;
        right: 10px;
        left: 10px;
        width: auto;
        height: 500px;
    }
    
    .chatbot-quick-actions {
        padding: 10px 15px;
    }
    
    .quick-action {
        font-size: 11px;
        padding: 6px 10px;
    }
} 