/* 
* Easycity-eu.com - City Trip Planner Stylesheet
* Version: 1.0
*/

/* Specific styling for the City Trip planner page */
:root {
    --primary: #4a6fa5;
    --secondary: #ff9e44;
    --dark: #333;
    --light: #f5f5f5;
    --success: #4caf50;
    --border-radius: 8px;
}

.page-content {
    padding-top: 10rem;
    padding-bottom: 5rem;
}

/* Tabs styling */
.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.tab {
    padding: 15px 25px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab.active {
    border-bottom: 3px solid var(--secondary-color);
    font-weight: 600;
    color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Filter container and sections */
.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.filter-section {
    flex: 1;
    min-width: 300px;
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.filter-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.filter-section h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary-color);
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--text-color);
}

select, input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

select:focus, input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(78, 84, 200, 0.1);
}

/* Radio and checkbox option styling */
.radio-group, .checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.radio-option, .checkbox-option {
    display: flex;
    align-items: center;
    background: #f0f0f0;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-option:hover, .checkbox-option:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.radio-option.selected, .checkbox-option.selected {
    background: var(--secondary-color);
    color: white;
}

.radio-option input, .checkbox-option input {
    display: none;
}

/* Sablier animé pour le loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1000;
}

.hourglass {
    position: relative;
    width: 100px;
    height: 160px;
    margin-bottom: 30px;
}

.hourglass-top {
    position: absolute;
    top: 0;
    left: 50%;
    width: 80px;
    height: 80px;
    background-color: #f0f0f0;
    border: 5px solid #3b82f6;
    border-radius: 50% 50% 0 0;
    transform: translateX(-50%);
    overflow: hidden;
}

.hourglass-bottom {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 80px;
    height: 80px;
    background-color: #f0f0f0;
    border: 5px solid #3b82f6;
    border-radius: 0 0 50% 50%;
    transform: translateX(-50%);
    overflow: hidden;
}

.hourglass-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 10px;
    background-color: #3b82f6;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.sand-top {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffcc80;
    animation: sand-flow-top 3s linear infinite;
}

.sand-bottom {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background-color: #ffcc80;
    animation: sand-flow-bottom 3s linear infinite;
}

@keyframes sand-flow-top {
    0% {
        height: 100%;
        bottom: 0;
    }
    90% {
        height: 0%;
        bottom: 0;
    }
    100% {
        height: 0%;
        bottom: 0;
    }
}

@keyframes sand-flow-bottom {
    0% {
        height: 0%;
        top: 0;
    }
    90% {
        height: 100%;
        top: 0;
    }
    100% {
        height: 100%;
        top: 0;
    }
}

.loader p {
    font-size: 18px;
    color: #3b82f6;
    margin-top: 10px;
    text-align: center;
    font-weight: 500;
}

/* Result container styling */
.result-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-top: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: none;
}

/* Mise en page verticale pour les résultats */
.result-layout-vertical {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 20px;
}

.itinerary-section {
    width: 100%;
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.chat-section {
    width: 100%;
    min-height: 500px;
    max-height: 600px;
    display: flex;
    flex-direction: column;
}

/* Itinerary styling */
.itinerary-day {
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.itinerary-day:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.itinerary-day h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.city-location {
    background-color: var(--primary);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    display: inline-block;
    font-size: 0.9em;
}

.city-location strong {
    font-weight: 600;
}

.activity-item {
    padding: 10px;
    margin-bottom: 10px;
    border-left: 3px solid var(--secondary-color);
    background-color: white;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.activity-time {
    font-weight: bold;
    color: var(--primary-color);
}

.activity-description {
    margin-top: 5px;
}

.activity-description strong {
    display: block;
    margin-bottom: 5px;
}

/* Chat styling */
/* Nouvelle structure d'itinéraire - style horizontal par blocs de 3 */
.structured-itinerary {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}

.day-structure {
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 15px;
    border-left: 4px solid #3b82f6;
}

.day-structure h4 {
    background-color: #3b82f6;
    margin: 0;
    padding: 10px 15px;
    color: white;
    font-weight: 600;
    border-bottom: 1px solid #3070e0;
}

.day-content {
    padding: 0;
}

.time-block {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #e5e7eb;
}

.time-block:last-child {
    border-bottom: none;
}

.time-label {
    width: 120px;
    color: #6366f1;
    font-weight: 500;
    font-size: 0.95em;
}

.activity-preview {
    flex: 1;
    font-size: 0.95em;
    color: #4b5563;
}

/* Style pour les jours comme dans l'image fournie - par blocs de 3 */
.horizontal-day-container {
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
    margin-bottom: 20px;
    overflow: hidden;
    width: calc(33.333% - 15px);
    min-width: 280px;
}

.day-header {
    background-color: #f8f9fa;
    color: #3b82f6;
    padding: 12px 15px;
    font-weight: 600;
    font-size: 1.1em;
    border-bottom: 1px solid #e5e7eb;
}

.day-timeline {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.timeline-item {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    min-height: 50px;
}

.timeline-item:last-child {
    border-bottom: none;
}

.time-period {
    width: 100px;
    padding: 12px 15px;
    color: #6366f1;
    font-weight: 500;
    border-right: 1px solid #e5e7eb;
}

.activity-content {
    flex: 1;
    padding: 12px 15px;
    color: #4b5563;
}

/* Chat container */
.chat-container {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: 100%;
    transition: box-shadow 0.3s ease;
}

.chat-container:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.chat-header {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 15px;
}

.chat-header h3 {
    margin: 0 0 5px 0;
    color: white;
}

.chat-header p {
    margin: 0;
    font-size: 0.9em;
    opacity: 0.8;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #f8f9fa;
}

.chat-message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 18px;
    word-break: break-word;
}

.chat-message.user {
    align-self: flex-end;
    background-color: var(--secondary-color);
    color: white;
    border-bottom-right-radius: 5px;
}

.chat-message.system {
    align-self: flex-start;
    background-color: #f0f0f0;
    border-bottom-left-radius: 5px;
    width: 100%;
    max-width: 100%;
    padding: 15px;
}

/* Styling for the Perplexity-style responses */
.chat-message.system h3,
.chat-message.system h4 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #2a3f5f;
}

.chat-message.system ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.chat-message.system li {
    margin-bottom: 5px;
}

/* Style for time slots in itineraries */
.chat-message.system [class^="activity-time"],
.chat-message.system time,
.chat-message.system span[style*="color:"],
.chat-message.system .time {
    color: #6366f1 !important;  /* violet color like in the screenshot */
    font-weight: 500;
    display: block;
    margin-bottom: 5px;
}

/* Style for location/activity names */
.chat-message.system strong,
.chat-message.system b {
    color: #1e293b;
    font-size: 1.05em;
    display: block;
    margin-bottom: 5px;
}

/* Style for descriptions */
.chat-message.system p {
    color: #4b5563;
    margin-bottom: 15px;
    line-height: 1.5;
}

/* Day divisions */
.chat-message.system .itinerary-day,
.chat-message.system div[style*="margin-bottom"] {
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.chat-input-container {
    display: flex;
    padding: 10px;
    border-top: 1px solid #eee;
    background-color: white;
}

#chat-input {
    flex-grow: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 14px;
    resize: none;
    height: 40px;
    margin-right: 10px;
}

#send-message {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    background-color: var(--secondary-color);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

#send-message:hover {
    transform: scale(1.1);
    background-color: var(--secondary-dark);
}

/* Suggested prompts styling */
.suggested-prompts {
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.suggested-prompts h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
}

.prompt-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.prompt-button {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.prompt-button:hover {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* Action buttons */
.action-buttons {
    margin-top: 20px;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .filter-section {
        min-width: 100%;
    }
    
    .result-layout {
        flex-direction: column;
    }
    
    .itinerary-column, .chat-column {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .tabs {
        flex-wrap: wrap;
    }
    
    .tab {
        flex: 1;
        text-align: center;
        min-width: 120px;
        padding: 10px 5px;
    }
    
    .chat-message {
        max-width: 90%;
    }
}

@media (max-width: 576px) {
    .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
}

/* Styles pour l'autocomplétion des villes */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

.autocomplete-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.1);
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background-color: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    z-index: 100;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: none;
}

.autocomplete-results.show {
    display: block;
}

.autocomplete-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.2s ease;
}

.autocomplete-item:hover {
    background-color: #f5f5f5;
}

.autocomplete-item.selected {
    background-color: #e9f0f8;
}

.city-input-container {
    margin-top: 10px;
    transition: all 0.3s ease;
}
