/* Panel Contextual - Estilos */

.context-panel {
    width: 380px;
    background: white;
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

/* Occupancy Widget Styles */
.occupancy-widget {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    border: 1px solid #e0e0e0;
}

.occupancy-widget h4 {
    margin: 0 0 0.8rem 0;
    color: #1a237e;
    font-size: 0.95rem;
    font-weight: 600;
}

.occupancy-chart {
    display: flex;
    align-items: end;
    justify-content: space-between;
    height: 60px;
    margin-bottom: 0.8rem;
    padding: 0 5px;
}

.hour {
    flex: 1;
    background: #e3f2fd;
    margin: 0 1px;
    border-radius: 4px 4px 0 0;
    min-height: 2px;
    position: relative;
    font-size: 0.65rem;
    color: #4a6572;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.hour.active {
    background: #1e88e5;
    color: white;
}

.hour-label {
    position: absolute;
    bottom: -15px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.6rem;
    color: #4a6572;
}

.occupancy-label {
    margin: 0;
    font-size: 0.8rem;
    text-align: center;
}

.status.busy {
    color: #d32f2f;
    font-weight: 500;
}

.status.moderate {
    color: #f57c00;
    font-weight: 500;
}

.status.low {
    color: #388e3c;
    font-weight: 500;
}
    flex-shrink: 0;
}

.context-panel.minimized {
    width: 0;
    min-width: 0;
    overflow: visible;
    box-shadow: none;
}

.context-panel.minimized .context-header {
    position: fixed;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: 50% 0 0 50%;
    justify-content: center;
    align-items: center;
    box-shadow: -2px 0 10px rgba(0,0,0,0.2);
}

.context-panel.minimized .context-header h2 {
    display: none;
}

.context-panel.minimized .context-minimize {
    margin: 0;
}

.context-panel.minimized .context-body {
    display: none;
}

/* Header del Panel */
.context-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #1e88e5 0%, #26a69a 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.context-header h2 {
    font-size: 1.3rem;
    margin: 0;
}

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

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

/* Body del Panel */
.context-body {
    flex: 1;
    overflow-y: auto;
}

/* Hero Section */
.context-hero {
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, #1e88e515 0%, #26a69a15 100%);
    text-align: center;
    border-bottom: 3px solid #1e88e5;
}

.context-hero.gastro {
    background: linear-gradient(135deg, #FF6B6B15 0%, #FFA50015 100%);
    border-bottom-color: #FF6B6B;
}

.context-hero.culture {
    background: linear-gradient(135deg, #4ECDC415 0%, #44A08D15 100%);
    border-bottom-color: #4ECDC4;
}

.context-hero.business {
    background: linear-gradient(135deg, #F38181 15 0%, #FCE38A15 100%);
    border-bottom-color: #F38181;
}

.context-hero.tips {
    background: linear-gradient(135deg, #FEC107 15 0%, #FFA72615 100%);
    border-bottom-color: #FFC107;
}

.context-hero h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.context-subtitle {
    font-size: 1rem;
    color: #666;
    font-style: italic;
}

/* Secciones */
.context-section {
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.context-section h3 {
    font-size: 1.1rem;
    color: #1e88e5;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.context-section.highlight {
    background: #fff9e6;
    border-left: 4px solid #ffc107;
}

.context-section.recommendation {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.info-icon {
    font-size: 1.8rem;
}

.info-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 0.2rem;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

/* Place Card */
.place-card {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.place-card h4 {
    color: #1e88e5;
    margin-bottom: 0.3rem;
}

.place-type {
    font-size: 0.85rem;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.place-card p {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* History Note */
.history-note {
    padding: 1rem;
    background: #e8eaf6;
    border-left: 4px solid #1e88e5;
    border-radius: 6px;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Curiosity Items */
.curiosity-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #fff3e0;
    border-radius: 8px;
}

.curiosity-icon {
    font-size: 1.5rem;
}

.curiosity-item p {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Event Card */
.event-card {
    padding: 1rem;
    background: linear-gradient(135deg, #1e88e515 0%, #26a69a15 100%);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.event-card .festival-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.festival-month,
.event-month {
    background: #1e88e5;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.event-card h4 {
    color: #1e88e5;
    margin-bottom: 0.3rem;
}

/* Dish Card (Gastronomía) */
.dish-card {
    padding: 1.2rem;
    background: white;
    border: 2px solid #FFE0E0;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.dish-card h4 {
    color: #FF6B6B;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.dish-description {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.8rem;
}

.dish-where,
.dish-price,
.dish-tip {
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.dish-where {
    color: #666;
}

.dish-price {
    color: #4caf50;
    font-weight: 600;
}

.dish-tip {
    background: #fff9e6;
    padding: 0.6rem;
    border-radius: 6px;
    border-left: 3px solid #ffc107;
}

/* Product Item */
.product-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.8rem;
}

.product-item h4 {
    color: #1e88e5;
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.product-item p {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.product-item small {
    color: #999;
    font-size: 0.8rem;
}

/* Route Highlight */
.route-highlight {
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    border: 2px solid #ffc107;
}

.route-highlight p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* Person Card (Cultura) */
.person-card {
    padding: 1.2rem;
    background: white;
    border: 2px solid #e0f2f1;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.person-card h4 {
    color: #4ECDC4;
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.person-years {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 0.3rem;
}

.person-profession {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.8rem;
}

.person-legacy {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.8rem;
}

.person-quote {
    padding: 1rem;
    background: #f0f0f0;
    border-left: 4px solid #4ECDC4;
    border-radius: 6px;
    font-style: italic;
    color: #555;
    margin-top: 0.8rem;
}

/* Festival Card */
.festival-card {
    padding: 1rem;
    background: linear-gradient(135deg, #4ECDC415 0%, #44A08D15 100%);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.festival-card h4 {
    color: #4ECDC4;
    margin-bottom: 0.5rem;
}

.festival-entry {
    font-size: 0.85rem;
    color: #4caf50;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Craft Item */
.craft-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.8rem;
}

.craft-item h4 {
    color: #1e88e5;
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

/* Business Rating Big */
.business-rating-big {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #FFF9E615 0%, #FFE0E015 100%);
    border-radius: 15px;
}

.rating-stars {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.rating-number {
    font-size: 3rem;
    font-weight: bold;
    color: #FF6B6B;
}

.rating-count {
    font-size: 0.9rem;
    color: #666;
}

/* Business Info List */
.business-info-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.info-row .info-icon {
    font-size: 1.3rem;
}

.info-row a {
    color: #1e88e5;
    text-decoration: none;
    font-weight: 500;
}

.info-row a:hover {
    text-decoration: underline;
}

/* Hours List */
.hours-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hour-item {
    padding: 0.6rem 0.8rem;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.85rem;
}

/* Recommendation Card */
.recommendation-card {
    padding: 1.2rem;
    background: white;
    border-radius: 10px;
}

.recommendation-card h4 {
    color: #4caf50;
    margin-bottom: 0.5rem;
}

.tip-highlight {
    background: #fff9e6;
    padding: 0.8rem;
    border-radius: 6px;
    border-left: 3px solid #ffc107;
    margin-top: 0.8rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.btn-action {
    padding: 0.9rem 1.2rem;
    border: 2px solid #e0e0e0;
    background: white;
    color: #666;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-action:hover {
    background: #f8f9fa;
    border-color: #ccc;
}

.btn-action.primary {
    background: linear-gradient(135deg, #1e88e5 0%, #26a69a 100%);
    border: none;
    color: white;
}

.btn-action.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Tips */
.tip-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
    padding: 0.8rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.tip-icon {
    color: #4caf50;
    font-weight: bold;
    font-size: 1.2rem;
}

.tip-item p {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Route Summary */
.route-summary {
    padding: 1.2rem;
    background: white;
    border-radius: 10px;
}

.route-summary p {
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
}

.route-summary strong {
    color: #1e88e5;
}

/* Responsive */
@media (max-width: 1400px) {
    .context-panel {
        width: 320px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1200px) {
    .context-panel {
        position: fixed;
        right: 0;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transform: translateX(100%);
    }

    .context-panel.active {
        transform: translateX(0);
    }
}

/* Scrollbar personalizado */
.context-body::-webkit-scrollbar {
    width: 8px;
}

.context-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.context-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.context-body::-webkit-scrollbar-thumb:hover {
    background: #999;
}

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

.context-section {
    animation: fadeInUp 0.3s ease;
}

/* Smart Suggestions (Sugerencias IA) */
.smart-suggestions-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.smart-suggestions-section h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    color: #FFCA28;
}

.smart-suggestions-empty {
    font-size: 0.9rem;
    color: #B0BEC5;
    line-height: 1.4;
}

.smart-suggestions-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.smart-suggestion-card {
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.12), rgba(38, 166, 154, 0.08));
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(6px);
}

.smart-suggestion-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}

.smart-suggestion-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    font-size: 18px;
}

.smart-suggestion-title h4 {
    margin: 0;
    font-size: 0.95rem;
}

.smart-suggestion-label {
    display: inline-block;
    margin-top: 0.1rem;
    font-size: 0.8rem;
    color: #80DEEA;
}

.smart-suggestion-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.smart-suggestion-rating {
    color: #FFCA28;
}

.smart-suggestion-category {
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
}

.smart-suggestion-address {
    margin: 0 0 0.5rem 0;
    font-size: 0.82rem;
    color: #CFD8DC;
}

.smart-suggestion-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    flex: 1;
    padding: 0.35rem 0.5rem;
    font-size: 0.78rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #1e88e5, #26a69a);
    color: #fff;
    font-weight: 500;
    transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.1s ease;
}

.btn-small.secondary {
    background: rgba(255, 255, 255, 0.1);
}

.btn-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    opacity: 0.95;
}

/* =========================================
   TABS SYSTEM STYLES
   ========================================= */

.context-tabs {
    display: flex;
    background: linear-gradient(135deg, #1e88e5 0%, #26a69a 100%);
    padding: 0;
    gap: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.context-tab {
    flex: 1;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    position: relative;
    text-align: center;
}

.context-tab:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-2px);
}

.context-tab.active {
    background: white;
    color: #1e88e5;
    font-weight: 700;
    border-bottom-color: #1e88e5;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}

.context-tab-content {
    display: none !important;
    flex: 1;
    overflow-y: auto;
    height: calc(100vh - 200px);
}

.context-tab-content.active {
    display: flex !important;
    flex-direction: column;
}

/* Deep Research Input Styles */
#deepResearchInput:focus {
    outline: none;
    border-color: #1e88e5 !important;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

/* Research Results Container */
#research-results {
    max-height: calc(100vh - 350px);
    overflow-y: auto;
}

/* Suggestions Container */
#suggestions-container {
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

/* Info Container */
#tab-info .context-body {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}
