/**
 * Tourgo Bot Connector 3.2 - New Design
 * Beautiful trip cards inspired by modern travel websites
 */

/* Import Google Font - Poppins for country names */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@900&display=swap');

:root {
    --tourgo-primary: #5DBEBD;
    --tourgo-secondary: #FF8A65;
    --tourgo-background: #F5F7FA;
    --tourgo-text: #333333;
    --tourgo-button: #4A90E2;
    --tourgo-button-hover: #357ABD;
    --tourgo-border-radius: 16px;
    --tourgo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Main Container */
.tourgo-bot-wrapper {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    font-family: var(--tourgo-font-family);
    direction: rtl;
}

.tourgo-bot-container {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 24px;
    min-height: 600px;
}

/* ========================================
   CHAT PANEL
   ======================================== */

.tourgo-chat-panel {
    background: white;
    border-radius: var(--tourgo-border-radius);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tourgo-chat-header {
    background: linear-gradient(135deg, var(--tourgo-primary) 0%, #4AA9A8 100%);
    color: white;
    padding: 24px;
    text-align: center;
}

.tourgo-chat-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.tourgo-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    max-height: 400px;
}

.tourgo-message {
    margin-bottom: 16px;
    padding: 14px 18px;
    border-radius: 16px;
    max-width: 85%;
    animation: fadeIn 0.3s ease;
    line-height: 1.5;
}

.tourgo-bot-message {
    background: #E8F5F5;
    color: #333;
    margin-right: auto;
}

.tourgo-user-message {
    background: var(--tourgo-primary);
    color: white;
    margin-left: auto;
}

.tourgo-quick-filters {
    padding: 16px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border-top: 1px solid #eee;
}

.tourgo-filter-btn {
    background: white;
    border: 2px solid var(--tourgo-primary);
    color: var(--tourgo-primary);
    padding: 10px 18px;
    border-radius: 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.tourgo-filter-btn:hover {
    background: var(--tourgo-primary);
    color: white;
    transform: translateY(-2px);
}

.tourgo-chat-input {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 12px;
}

.tourgo-chat-input input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid #eee;
    border-radius: 28px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
}

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

.tourgo-chat-input button {
    width: 52px;
    height: 52px;
    background: var(--tourgo-primary);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 20px;
}

.tourgo-chat-input button:hover {
    background: var(--tourgo-button-hover);
    transform: scale(1.1);
}

/* ========================================
   RESULTS PANEL
   ======================================== */

.tourgo-results-panel {
    background: white;
    border-radius: var(--tourgo-border-radius);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 24px;
    overflow-y: auto;
    max-height: 900px;
}

.tourgo-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #eee;
}

.tourgo-results-header h3 {
    margin: 0;
    font-size: 26px;
    color: var(--tourgo-text);
    font-weight: 700;
}

.tourgo-results-count {
    background: var(--tourgo-primary);
    color: white;
    padding: 8px 20px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 700;
}

/* ========================================
   TRIP CARDS - NEW DESIGN
   ======================================== */

.tourgo-results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    align-items: stretch;
}

.tourgo-trip-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.5s ease;
    border: 1px solid #f0f0f0;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tourgo-trip-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

/* Card Header with Gradient Background */
.tourgo-card-header {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Gradient backgrounds for different continents/countries */
.tourgo-card-header.gradient-teal {
    background: linear-gradient(135deg, #43C6AC 0%, #5DBEBD 100%);
}

.tourgo-card-header.gradient-yellow {
    background: linear-gradient(135deg, #F4D03F 0%, #F7B733 100%);
}

.tourgo-card-header.gradient-coral {
    background: linear-gradient(135deg, #FC6C85 0%, #F77062 100%);
}

.tourgo-card-header.gradient-purple {
    background: linear-gradient(135deg, #A18CD1 0%, #FBC2EB 100%);
}

.tourgo-card-header.gradient-blue {
    background: linear-gradient(135deg, #4A90E2 0%, #5DBEBD 100%);
}

.tourgo-card-header.gradient-orange {
    background: linear-gradient(135deg, #FF8A65 0%, #FF7043 100%);
}

/* No images - using gradients only */

/* Country name overlay */
.tourgo-country-name {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 56px;
    font-weight: 900;
    font-family: 'Poppins', sans-serif;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    text-align: center;
    z-index: 2;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Difficulty Badge */
.tourgo-difficulty-badge {
    position: absolute;
    bottom: 16px;
    right: 16px;
    padding: 8px 18px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    z-index: 3;
}

.tourgo-difficulty-badge.easy {
    background: linear-gradient(135deg, #4CAF50 0%, #45A049 100%);
    color: white;
}

.tourgo-difficulty-badge.medium {
    background: linear-gradient(135deg, #FFA726 0%, #FF9800 100%);
    color: white;
}

.tourgo-difficulty-badge.hard {
    background: linear-gradient(135deg, #EF5350 0%, #E53935 100%);
    color: white;
}

/* Card Content */
.tourgo-card-content {
    padding: 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tourgo-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--tourgo-text);
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 56px;
}

/* Country tags */
.tourgo-country-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tourgo-country-tag {
    background: #E8F5F5;
    color: var(--tourgo-primary);
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
}

.tourgo-card-description {
    font-size: 15px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 75px;
    flex: 1;
}

/* Card Details with Icons */
.tourgo-card-details {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
    padding: 20px;
    background: #F8F9FA;
    border-radius: 12px;
}

.tourgo-detail-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: #555;
}

.tourgo-detail-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.tourgo-detail-label {
    font-weight: 600;
    color: #777;
    min-width: 80px;
}

.tourgo-detail-value {
    color: var(--tourgo-text);
    font-weight: 600;
    flex: 1;
}

/* Card Footer */
.tourgo-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}

.tourgo-export-link {
    color: #888;
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.tourgo-export-link:hover {
    color: var(--tourgo-primary);
}

.tourgo-details-button {
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 28px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.3);
}

.tourgo-details-button:hover {
    background: linear-gradient(135deg, #357ABD 0%, #2868A8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.5);
}

.tourgo-details-button::after {
    content: '←';
    font-size: 18px;
    transition: transform 0.3s;
}

.tourgo-details-button:hover::after {
    transform: translateX(-4px);
}

/* Company Badge */
.tourgo-company-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #888;
    font-weight: 500;
    margin-bottom: 12px;
}

.tourgo-company-badge::before {
    content: '🏢';
    font-size: 16px;
}

/* ========================================
   EMPTY STATE
   ======================================== */

.tourgo-empty-state {
    text-align: center;
    padding: 100px 20px;
    color: #999;
}

.tourgo-empty-state svg {
    margin-bottom: 24px;
    opacity: 0.6;
}

.tourgo-empty-state p {
    font-size: 20px;
    margin: 0;
    color: #666;
}

/* ========================================
   LOAD MORE
   ======================================== */

.tourgo-load-more {
    text-align: center;
    padding: 40px 0;
}

.tourgo-load-more button {
    background: linear-gradient(135deg, var(--tourgo-primary) 0%, #4AA9A8 100%);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 32px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(93, 190, 189, 0.3);
}

.tourgo-load-more button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(93, 190, 189, 0.5);
}

/* Loading Spinner */
.tourgo-loading {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1400px) {
    .tourgo-results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1200px) {
    .tourgo-bot-container {
        grid-template-columns: 350px 1fr;
    }
}

@media (max-width: 968px) {
    .tourgo-bot-container {
        grid-template-columns: 1fr;
    }
    
    .tourgo-chat-panel {
        order: 2;
    }
    
    .tourgo-results-panel {
        order: 1;
    }
    
    .tourgo-results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tourgo-results-grid {
        grid-template-columns: 1fr;
    }
    
    .tourgo-country-name {
        font-size: 36px;
    }
}

@media (max-width: 640px) {
    .tourgo-bot-wrapper {
        padding: 12px;
    }
    
    .tourgo-bot-container {
        gap: 16px;
    }
    
    .tourgo-card-title {
        font-size: 18px;
    }
    
    .tourgo-quick-filters {
        flex-direction: column;
    }
    
    .tourgo-filter-btn {
        width: 100%;
    }
    
    .tourgo-card-header {
        height: 160px;
    }
    
    .tourgo-country-name {
        font-size: 20px;
        letter-spacing: 1px;
        padding: 0 10px;
        word-wrap: break-word;
        max-width: 90%;
    }
    
    .tourgo-trip-card {
        min-height: auto;
    }
    
    .tourgo-card-body {
        padding: 16px;
    }
    
    .tourgo-card-description {
        font-size: 13px;
        line-height: 1.5;
    }
    
    .tourgo-details-button {
        padding: 12px 24px;
        font-size: 14px;
    }
}

/* ========================================
   SCROLLBAR STYLING
   ======================================== */

.tourgo-chat-messages::-webkit-scrollbar,
.tourgo-results-panel::-webkit-scrollbar {
    width: 8px;
}

.tourgo-chat-messages::-webkit-scrollbar-track,
.tourgo-results-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.tourgo-chat-messages::-webkit-scrollbar-thumb,
.tourgo-results-panel::-webkit-scrollbar-thumb {
    background: var(--tourgo-primary);
    border-radius: 10px;
}

.tourgo-chat-messages::-webkit-scrollbar-thumb:hover,
.tourgo-results-panel::-webkit-scrollbar-thumb:hover {
    background: var(--tourgo-button-hover);
}

/* ========================================
   SPECIAL EFFECTS
   ======================================== */

.tourgo-trip-card.highlighted {
    border: 2px solid var(--tourgo-primary);
    box-shadow: 0 0 32px rgba(93, 190, 189, 0.4);
    animation: pulse 2s infinite;
}

/* Skeleton Loading */
.tourgo-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

