/* Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* RTL Support for Arabic */
.chatbot-container[dir="rtl"] {
    right: auto;
    left: 20px;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    position: relative;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0,0,0,0.2);
}

.chatbot-icon {
    color: white;
    font-size: 24px;
}

.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* RTL Support for badge */
.chatbot-container[dir="rtl"] .chatbot-badge {
    right: auto;
    left: -5px;
}

.badge-count {
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* RTL Support for chatbot window */
.chatbot-container[dir="rtl"] .chatbot-window {
    right: auto;
    left: 0;
}

.chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

.chatbot-info h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chatbot-status {
    margin: 0;
    font-size: 12px;
    opacity: 0.8;
}

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

.chatbot-controls button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: background 0.3s ease;
}

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

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* RTL Support for messages container */
.chatbot-container[dir="rtl"] .chatbot-messages {
    direction: rtl;
}

.message {
    display: flex;
    margin-bottom: 10px;
}

.user-message {
    justify-content: flex-end;
}

.bot-message {
    justify-content: flex-start;
}

/* RTL Support for messages */
.chatbot-container[dir="rtl"] .message.user-message {
    justify-content: flex-start;
}

.chatbot-container[dir="rtl"] .message.bot-message {
    justify-content: flex-end;
}

.message-content {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
}

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

.bot-message .message-content {
    background: #f8f9fa;
    color: #333;
    border-bottom-left-radius: 5px;
}

/* RTL Support for message content */
.chatbot-container[dir="rtl"] .user-message .message-content {
    border-bottom-right-radius: 18px;
    border-bottom-left-radius: 5px;
}

.chatbot-container[dir="rtl"] .bot-message .message-content {
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 5px;
}

.message-text {
    margin-bottom: 5px;
}

.message-text p {
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.message-text ul {
    margin: 8px 0;
    padding-left: 20px;
}

/* RTL Support for lists */
.chatbot-container[dir="rtl"] .message-text ul {
    padding-left: 0;
    padding-right: 20px;
}

.message-text li {
    margin-bottom: 4px;
}

.message-time {
    font-size: 11px;
    opacity: 0.7;
    text-align: right;
}

/* RTL Support for message time */
.chatbot-container[dir="rtl"] .message-time {
    text-align: left;
}

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.quick-action-btn {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.quick-action-btn:hover {
    background: #f8f9fa;
    border-color: #667eea;
    color: #667eea;
}

/* RTL Support for quick action buttons */
.chatbot-container[dir="rtl"] .quick-action-btn {
    flex-direction: row-reverse;
}

.chatbot-input {
    padding: 15px;
    border-top: 1px solid #eee;
}

.input-group {
    display: flex;
    gap: 10px;
}

/* RTL Support for input group */
.chatbot-container[dir="rtl"] .input-group {
    flex-direction: row-reverse;
}

#chatbot-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 15px;
    outline: none;
    transition: border-color 0.3s ease;
}

#chatbot-input:focus {
    border-color: #667eea;
}

/* RTL Support for input */
.chatbot-container[dir="rtl"] #chatbot-input {
    text-align: right;
}

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

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

/* Responsive */
@media (max-width: 480px) {
    .chatbot-window {
        width: 300px;
        height: 400px;
        bottom: 70px;
        right: 10px;
    }
    
    /* RTL Support for mobile */
    .chatbot-container[dir="rtl"] .chatbot-window {
        right: auto;
        left: 10px;
    }
    
    .chatbot-toggle {
        width: 50px;
        height: 50px;
    }
    
    .chatbot-icon {
        font-size: 20px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-window {
    animation: fadeIn 0.3s ease;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 18px;
    border-bottom-left-radius: 5px;
    max-width: 60px;
}

/* RTL Support for typing indicator */
.chatbot-container[dir="rtl"] .typing-indicator {
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 5px;
}

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

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

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

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

/* Job suggestions */
.job-suggestion {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px;
    margin: 8px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.job-suggestion:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.job-suggestion h6 {
    margin: 0 0 4px 0;
    color: #333;
    font-weight: 600;
}

.job-suggestion p {
    margin: 0;
    font-size: 12px;
    color: #666;
}

.job-suggestion .company {
    color: #667eea;
    font-weight: 500;
}

/* Loading animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Error message */
.error-message {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

/* Success message */
.success-message {
    background: #efe;
    border: 1px solid #cfc;
    color: #3c3;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

/* Info message */
.info-message {
    background: #eef;
    border: 1px solid #ccf;
    color: #33c;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

/* Enhanced Chatbot Styles */
.suggestions-container {
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.suggestion-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.suggestion-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-btn:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.chatbot-container .navigation-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.chatbot-container  .nav-link {
    display: block;
    padding: 10px 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.chatbot-container  .nav-link:hover {
    background: #667eea;
    color: white;
    text-decoration: none;
    transform: translateX(2px);
}

.quick-actions-container {
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.quick-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.quick-action-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quick-action-btn:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.capabilities-list {
    margin-top: 15px;
    padding: 10px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
}

.capabilities-list ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.capabilities-list li {
    margin-bottom: 5px;
    color: #856404;
    font-size: 14px;
}

.tips-container {
    margin-top: 15px;
    padding: 10px;
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 8px;
}

.tips-container ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.tips-container li {
    margin-bottom: 5px;
    color: #0c5460;
    font-size: 14px;
}

/* RTL Support for new elements */
.chatbot-container[dir="rtl"] .suggestions-container {
    text-align: right;
}

.chatbot-container[dir="rtl"] .suggestion-buttons {
    justify-content: flex-end;
}

.chatbot-container[dir="rtl"] .nav-link:hover {
    transform: translateX(-2px);
}

.chatbot-container[dir="rtl"] .capabilities-list ul {
    padding-right: 20px;
    padding-left: 0;
}

.chatbot-container[dir="rtl"] .tips-container ul {
    padding-right: 20px;
    padding-left: 0;
}

/* Enhanced message styling */
.message-text strong {
    color: #667eea;
    font-weight: 600;
}

.message-text ul {
    margin: 10px 0;
    padding-left: 20px;
}

.message-text li {
    margin-bottom: 5px;
    line-height: 1.4;
}

/* Responsive design for new elements */
@media (max-width: 480px) {
    .suggestion-buttons,
    .quick-action-buttons {
        flex-direction: column;
    }
    
    .suggestion-btn,
    .quick-action-btn {
        max-width: 100%;
        text-align: center;
    }
    
  .chatbot-container   .navigation-links {
        gap: 6px;
    }
    
    .chatbot-container  .nav-link {
        padding: 8px 12px;
        font-size: 14px;
    }
}

/* Animation for new elements */
.suggestions-container,
.quick-actions-container,
.capabilities-list,
.tips-container {
    animation: slideInUp 0.3s ease-out;
}

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

/* Enhanced hover effects */
.suggestion-btn:active,
.quick-action-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.chatbot-container .nav-link:active {
    transform: translateX(0);
}

/* Focus states for accessibility */
.suggestion-btn:focus,
.quick-action-btn:focus,
.chatbot-container  .nav-link:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Loading state for buttons */
.suggestion-btn.loading,
.quick-action-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.suggestion-btn.loading::after,
.quick-action-btn.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

/* Search info container */
.search-info-container {
    margin-top: 15px;
    padding: 10px;
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 8px;
}

.search-params {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.search-param {
    background: #1976d2;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.search-link {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background: #1976d2;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.search-link:hover {
    background: #1565c0;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}

/* RTL Support for search info */
.chatbot-container[dir="rtl"] .search-info-container {
    text-align: right;
}

.chatbot-container[dir="rtl"] .search-params {
    justify-content: flex-end;
}

/* Enhanced quick action buttons */
.quick-action-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.quick-action-btn:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    color: white;
    text-decoration: none;
}

/* Enhanced suggestion buttons */
.suggestion-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-btn:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Responsive design for search info */
@media (max-width: 480px) {
    .search-params {
        flex-direction: column;
    }
    
    .search-param {
        text-align: center;
    }
    
    .search-link {
        width: 100%;
        text-align: center;
    }
}

/* Animation for search info */
.search-info-container {
    animation: slideInUp 0.3s ease-out;
}

/* Enhanced focus states */
.search-link:focus,
.quick-action-btn:focus,
.suggestion-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Loading animation for search */
.search-info-container.loading {
    opacity: 0.7;
    pointer-events: none;
}

.search-info-container.loading::after {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid #1976d2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 10px auto 0;
}

/* Fallback Search Container */
.fallback-search-container {
    margin-top: 15px;
    padding: 12px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    text-align: center;
}

.fallback-search-container p {
    margin: 0 0 10px 0;
    color: #856404;
    font-style: italic;
    font-size: 14px;
}

.fallback-search-btn {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.fallback-search-btn:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    color: white;
    text-decoration: none;
}

.fallback-search-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

/* RTL Support for Fallback Search */
.chatbot-container[dir="rtl"] .fallback-search-container {
    text-align: center;
}

.chatbot-container[dir="rtl"] .fallback-search-container p {
    direction: rtl;
}

/* Responsive Design for Fallback Search */
@media (max-width: 480px) {
    .fallback-search-container {
        padding: 10px;
        margin-top: 12px;
    }
    
    .fallback-search-container p {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .fallback-search-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
} 