/**
 * T2India Enhancements CSS
 * Styles for image tooltips, search results, and modals
 * Matches existing purple/orange/green color scheme
 * 
 * Version: 2.0.0
 * Date: November 13, 2025
 */

/* ============================================================================
   IMAGE TOOLTIPS
   ============================================================================ */

.image-tooltip {
    position: absolute;
    z-index: 10000;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    pointer-events: none;
}

.image-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

.image-tooltip.below {
    transform: translateY(10px);
}

.image-tooltip.below.show {
    transform: translateY(0);
}

.tooltip-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16);
    overflow: hidden;
    width: 320px;
    max-width: 90vw;
}

.tooltip-header {
    padding: 12px 16px;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tooltip-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.photo-count {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    opacity: 0.9;
}

.tooltip-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.tooltip-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.tooltip-thumbnails {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: #f8f4ff;
}

.thumbnail {
    flex: 1;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.thumbnail:hover {
    transform: scale(1.05);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail.more {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
}

.tooltip-footer {
    padding: 8px 16px;
    background: #f8f4ff;
    text-align: center;
    color: #6b7280;
    font-size: 0.8rem;
}

/* ============================================================================
   SEARCH RESULTS
   ============================================================================ */

#searchResults {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: none;
}

.parsed-query-info {
    margin-bottom: 2rem;
}

.parsed-info-card {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

.parsed-info-card span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #1f2937;
    font-weight: 600;
}

.parsed-info-card i {
    color: #8b5cf6;
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.result-card {
    animation: slideUp 0.4s ease forwards;
    opacity: 0;
}

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

.result-card-inner {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.result-card-inner:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.16);
}

.result-card-inner.ai-generated {
    border: 2px solid #8b5cf6;
}

.result-image {
    position: relative;
    height: 200px;
    background-size: cover;
    background-position: center;
}

.type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: white;
    color: #1f2937;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.type-badge.ai-badge {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.approval-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: #f59e0b;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.result-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.result-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.75rem 0;
}

.result-description {
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 1rem 0;
    flex: 1;
}

.result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.result-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #6b7280;
    font-size: 0.9rem;
}

.result-meta i {
    color: #8b5cf6;
}

.view-details-btn {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.view-details-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.3);
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.no-results h3 {
    margin: 1rem 0 0.5rem 0;
    color: #1f2937;
}

/* ============================================================================
   ITINERARY MODAL
   ============================================================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

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

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.itinerary-overview {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f4ff;
    border-radius: 12px;
}

.overview-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
}

.overview-item i {
    color: #8b5cf6;
    font-size: 1.3rem;
}

.itinerary-section {
    margin-bottom: 2rem;
}

.itinerary-section h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #8b5cf6;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.itinerary-section h3 i {
    font-size: 1.1rem;
}

.days-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.day-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.day-card:hover {
    border-color: #8b5cf6;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.1);
}

.day-header {
    background: linear-gradient(135deg, #f8f4ff, #e8deff);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.day-number {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.day-header h4 {
    margin: 0;
    color: #1f2937;
    font-size: 1.1rem;
}

.day-content {
    padding: 1.5rem;
}

.activities h5 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #1f2937;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.activities ul {
    margin: 0;
    padding-left: 1.5rem;
    color: #6b7280;
}

.activities li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.day-content p {
    margin: 0.75rem 0;
    color: #6b7280;
    line-height: 1.6;
}

.day-content i {
    color: #8b5cf6;
    margin-right: 0.5rem;
}

.inclusions-list,
.exclusions-list {
    margin: 0;
    padding-left: 1.5rem;
    color: #6b7280;
}

.inclusions-list li,
.exclusions-list li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.modal-footer {
    padding: 1.5rem 2rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.3);
}

.btn-secondary {
    background: #e5e7eb;
    color: #1f2937;
}

.btn-secondary:hover {
    background: #d1d5db;
}

/* ============================================================================
   NOTIFICATIONS
   ============================================================================ */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.16);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10002;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    max-width: 400px;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-info {
    border-left: 4px solid #3b82f6;
}

.notification-error {
    border-left: 4px solid #ef4444;
}

.notification-warning {
    border-left: 4px solid #f59e0b;
}

.notification i {
    font-size: 1.5rem;
}

.notification-info i {
    color: #3b82f6;
}

.notification-error i {
    color: #ef4444;
}

.notification-warning i {
    color: #f59e0b;
}

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

@media (max-width: 768px) {
    .tooltip-content {
        width: 280px;
    }
    
    .search-results-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .itinerary-overview {
        flex-direction: column;
        gap: 1rem;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}
