@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@300;400;500;600;700&family=Yellowtail&display=swap');

/* Base Reset */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

html {
font-size: 100%; /* Base font size for rem units */
}

/* Global Body Styles */
body {
font-family: 'Lexend', sans-serif;
line-height: 1.5;
color: #000000; /* Default text color */
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center; /* Center content horizontally on desktop */
justify-content: center; /* Center content vertically on desktop */
padding: 1rem; /* Add some padding around the edges on desktop */
position: relative;
z-index: 0;
overflow-x: hidden; /* Prevent horizontal scroll */

/* Global background for index.html (landing page) */
background-image: url('assets/Landing_page.jpg');
background-size: cover;
background-position: center;
background-attachment: fixed;
}

/* Semi-transparent overlay for readability over background image on index.html */
body::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(135deg, rgba(102, 176, 233, 0.85) 0%, rgba(248, 154, 209, 0.85) 100%);
z-index: -1;
}

/* Font Utilities */
.font-primary {
font-family: 'Lexend', sans-serif;
}

.font-secondary {
font-family: 'Yellowtail', cursive;
}

/* Typography – Desktop First */
h1 {
font-size: 3rem;
font-weight: 700;
}

h2 {
font-size: 2.5rem;
font-weight: 600;
}

h3 {
font-size: 2rem;
font-weight: 600;
}

h4 {
font-size: 1.5rem;
font-weight: 500;
}

h5 {
font-size: 1.25rem;
font-weight: 500;
}

h6 {
font-size: 1rem;
font-weight: 500;
}

p {
font-size: 1rem;
font-weight: 400;
}

small {
font-size: 0.75rem;
}

.caption {
font-size: 0.875rem;
font-weight: 400;
}

/* Color Palette */
.primary { color: #EC008C; } .primary-light { color: #F250B2; } .primary-lighter { color: #F89AD1; } .primary-dark { color: #C60074; } .primary-darker { color: #96005A; }
.bg-primary { background-color: #EC008C; } .bg-primary-light { background-color: #F250B2; } .bg-primary-lighter { background-color: #F89AD1; } .bg-primary-dark { background-color: #C60074; } .bg-primary-darker { background-color: #96005A; }

.secondary { color: #0072CE; } .secondary-light { color: #3391DC; } .secondary-lighter { color: #66B0E9; } .secondary-dark { color: #0059A6; } .secondary-darker { color: #003F7A; }
.bg-secondary { background-color: #0072CE; } .bg-secondary-light { background-color: #3391DC; } .bg-secondary-lighter { background-color: #66B0E9; } .bg-secondary-dark { background-color: #0059A6; } .bg-secondary-darker { background-color: #003F7A; }

.tertiary { color: #6C2A85; } .tertiary-light { color: #8C49A2; } .tertiary-lighter { color: #AD76BA; } .tertiary-dark { color: #521E66; } .tertiary-darker { color: #39134A; }
.bg-tertiary { background-color: #6C2A85; } .bg-tertiary-light { background-color: #8C49A2; } .bg-tertiary-lighter { background-color: #AD76BA; } .bg-tertiary-dark { background-color: #521E66; } .bg-tertiary-darker { background-color: #39134A; }

.black { color: #000000; } .white { color: #FFFFFF; } .bg-black { background-color: #000000; } .bg-white { background-color: #FFFFFF; }

.gray-100 { color: #f5f5f5; } .gray-200 { color: #e0e0e0; } .gray-300 { color: #c2c2c2; } .gray-400 { color: #9e9e9e; } .gray-500 { color: #757575; } .gray-600 { color: #616161; } .gray-700 { color: #424242; } .gray-800 { color: #212121; }
.bg-gray-100 { background-color: #f5f5f5; } .bg-gray-200 { background-color: #e0e0e0; } .bg-gray-300 { background-color: #c2c2c2; } .bg-gray-400 { background-color: #9e9e9e; } .bg-gray-500 { background-color: #757575; } .bg-gray-600 { background-color: #616161; } .bg-gray-700 { background-color: #424242; } .bg-gray-800 { background-color: #212121; }


/* --- General Layout & Form Styles --- */

/* Form container */
.form-container {
background: #ffffff;
border-radius: 20px;
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
padding: 2.5rem;
width: 100%;
max-width:70vw; /* Limit form width on large screens */
transition: transform 0.3s ease-in-out;
position: relative;
z-index: 10;
}

.form-container:hover {
transform: translateY(-5px);
}

/* Logo specific styles */
.logo {
width: 5rem;
height: 5rem;
display: block;
margin-left: auto;
margin-right: auto;
margin-bottom: 1.5rem;
object-fit: contain;
}

/* Form spacing for direct children of the form */
.form-space-y > *:not(:last-child) {
margin-bottom: 1.5rem;
}

/* Grouping for form fields (label + input) */
.form-field-group {
margin-bottom: 1.5rem;
}

.logo-part{text-align:left; float:left; margin-right:40px; width:30%;}
.logo-part .logo{width:auto; height:5rem; margin:0px; text-align:left;}
.logo-part h2{text-align:left; line-height:52px; font-size:40px; padding-top:12px;}
.formcont{float:left; width:64%;}
.left-label{width:100%; display:table !important;}

.fieldgrp{position: relative; width:32%; float:left; margin-right:2%;}
.fieldgrp-last{margin-right:0px; float:left; width:32%;}

/* Labels for form inputs */
.form-label {
display: block;
color: #424242;
font-weight: 600;
margin-bottom: 0.5rem;
white-space: normal; /* Allow label text to wrap naturally */
line-height: 1.2; /* Ensure good line height for wrapped labels */
}

/* General styling for text inputs, number inputs, textareas, and selects */
.form-input,
.form-textarea,
.form-select {
width: 100%; /* Fluid width */
padding: 0.75rem 1rem;
border: 1px solid #c2c2c2;
border-radius: 10px;
transition: all 0.2s ease-in-out;
outline: none;
background-color: #ffffff;
color: #000000;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
border-color: #EC008C;
box-shadow: 0 0 0 3px rgba(236, 0, 140, 0.3);
}

/* Form heading specific style */
.form-heading {
text-align: center;
margin-bottom: 2rem;
}

/* Submit Button (main form button) */
.btn-gradient {
background: linear-gradient(to right, #0072CE, #EC008C);
color: #FFFFFF;
font-weight: 700;
padding: 0.75rem 1.5rem;
border-radius: 12px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
transition: all 0.3s ease-in-out;
width: 80%; /* Adjusted width to allow centering on desktop */
display: block;
margin: 0 auto;
border: none;
cursor: pointer;
text-align: center;
text-decoration: none;
}

.btn-gradient:hover {
background: linear-gradient(to right, #0059A6, #C60074);
transform: translateY(-2px);
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

.btn-gradient:disabled {
background: #c2c2c2;
box-shadow: none;
cursor: not-allowed;
transform: none;
opacity: 0.7;
}

/* Loading Indicator */
.loading-indicator {text-align:center; color:#0072CE; font-weight:600; display:none; font-size:0.9rem; width:100%; justify-content:center;}
.loading-indicator .loadingspinner{float:left; margin-right:4px; margin-top:2px;}
.loading-indicator p{float:left; margin-bottom:0px;}

/* Styling for suggested tags in the form */
.suggested-tags {
display: flex;
flex-wrap: wrap;
gap: 8px; /* Space between tags */
margin-top: 1rem; /* Space above tags */
margin-bottom: 0.5rem; /* Space below tags */
}

.tag-suggestion {
background-color: #e0f2f7; /* Light blue background, similar to existing tags */
color: #007bff; /* Primary blue text */
padding: 4px 16px;
border-radius: 20px; /* Pill shape */
font-size: 0.8rem;
font-weight:normal;
cursor: pointer; /* Indicate it's clickable */
transition: background-color 0.2s ease, transform 0.1s ease;
white-space: nowrap; /* Prevent tags from breaking */
}

.tag-suggestion:hover {
background-color: #cceeff; /* Slightly darker blue on hover */
transform: translateY(-1px); /* Subtle lift effect */
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.tag-suggestion:active {
transform: translateY(0); /* Press effect */
box-shadow: none;
}

/* Small text below tags */
.text-gray-600 {
color: #616161; /* gray-600 from your palette */
font-size: 0.85rem;
}

/* Utility classes for margin top, if not already defined */
.mt-3 { margin-top: 1rem; } /* Approx 16px */
.mt-2 { margin-top: 0.5rem; } /* Approx 8px */
.block { display: block; }


/* --- Result Page Specific Styles (result.php) --- */
/* Override body background for result page only */
body.result-page-body {
background-color: #f8f9fa; /* Very light gray background */
background-image: none; /* Remove background image */
justify-content: flex-start; /* Align content to top for result page */
padding: 0; /* Remove body padding for result page to allow header full width */
}

body.result-page-body::before {
content: none; /* Remove overlay */
}

.itinerary-header {
background: linear-gradient(to right, #0072CE, #EC008C);
color: #FFFFFF;
padding: 3rem 1rem;
text-align: center;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
width: 100%;
}

.itinerary-header h1 {
font-size: 3.5rem;
font-weight: 800;
margin-bottom: 0.5rem;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.itinerary-header .branding {
font-size: 1.1rem;
opacity: 0.9;
}

.itinerary-actions {
display: flex;
justify-content: center;
gap: 1rem;
margin-top: 1.5rem;
flex-wrap: wrap; /* Allow buttons to wrap on small screens */
}

.itinerary-container {
max-width: 1000px;
margin: 2rem auto 2rem auto;
border-radius: 20px;
position: relative;
z-index: 1;
background: #FFFFFF; /* Ensure white background for content */
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15); /* Stronger, softer shadow */
padding: 2.5rem; /* Add padding to the container itself */
}

.personalized-message {
background: #E0F7FA;
border-left: 8px solid #0072CE;
padding: 2rem;
margin-bottom: 2.5rem;
border-radius: 12px;
font-size: 1.15rem;
line-height: 1.6;
color: #212121;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
font-style: italic;
margin-top: 40px;
}

.section-title {
font-size: 2rem;
font-weight: 600;
color: #EC008C;
border-bottom: 2px solid #F89AD1;
padding-bottom: 0.5rem;
margin-top: 2.5rem;
margin-bottom: 1.5rem;
width: 100%; /* Ensure it spans full width in flex context */
}

/* Day-by-Day Itinerary */
.day-section {
margin-bottom: 2.5rem;
padding-left: 20px;
position: relative;
}

.day-section::before {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 4px;
background-color: #F250B2;
border-radius: 2px;
}

.day-header {
display: flex;
align-items: center;
gap: 1rem;
margin-bottom: 1.5rem;
padding-bottom: 0.5rem;
border-bottom: 1px solid #E0E0E0;
flex-wrap: wrap; /* Allow header content to wrap */
}

.day-header h3 {
color: #0072CE;
font-size: 1.8rem;
margin: 0;
display: flex; /* For drag handle icon alignment */
align-items: center;
flex-wrap: wrap; /* Allow day title to wrap */
flex-grow: 1; /* Allow title to take space */
}

.day-header .day-meta {
font-size: 1rem;
color: #757575;
font-weight: 500;
}

/* --- ACTIVITY CARD ADJUSTMENTS --- */
.activity-card {
background: #FFFFFF;
border-radius: 12px;
box-shadow: 0 5px 15px rgba(0,0,0,0.08);
margin-bottom: 1.5rem;
display: flex;
flex-direction: row;
align-items: center;
gap: 1.5rem;
padding: 1.5rem;
border: 1px solid #E0E0E0;
flex-wrap: wrap; /* Allow content and image to wrap */
}

.activity-card-content {
flex-grow: 1;
flex-basis: 60%; /* Minimum width for content before wrapping */
min-width: 200px; /* Ensure content is readable */
}

.activity-card-content .time-slot-display {
font-weight: 500;
color: #0059A6;
margin-bottom: 0.3rem;
display: block;
font-size: 0.8rem;
}

.activity-card-content h4.activity-description-display {
color: #C60074;
margin-bottom: 0.5rem;
font-weight: 600;
font-size: 1rem;
word-break: break-word; /* Ensure wrapping */
overflow-wrap: break-word;
display: flex; /* For drag handle icon alignment */
align-items: center;
}

.activity-card-content p {
font-size: 0.85rem;
color: #212121;
margin-bottom: 0.5rem;
}

.activity-card-image-container {
flex-shrink: 0;
width: 150px;
height: 100px;
border-radius: 8px;
overflow: hidden;
background-color: #f5f5f5;
margin-left: auto; /* Push image to the right if space allows */
}

.activity-card-image {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}

.activity-card-content .notes {
font-size: 0.85rem;
color: #757575;
margin-top: 1rem;
border-top: 1px dashed #E0E0E0;
padding-top: 0.75rem;
}


/* Booking Sections (Find Flights/Hotels) */
.booking-section {
background-color: #f5f5f5;
padding: 2rem;
border-radius: 15px;
margin-top: 2.5rem;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
border: 1px solid #E0E0E0;
}

.booking-section h3 {
color: #0072CE;
margin-bottom: 1.5rem;
}

.booking-section .btn {
padding: 0.75rem 1.5rem;
font-size: 1rem;
border-radius: 10px;
}

/* General Booking Suggestions (if they were present) */
.booking-card {
background: #FFFFFF;
border-radius: 10px;
padding: 1.5rem;
box-shadow: 0 3px 10px rgba(0,0,0,0.05);
margin-bottom: 1rem;
border: 1px solid #E0E0E0;
}

.booking-card h4 {
color: #EC008C;
margin-bottom: 0.5rem;
}

.booking-card p {
font-size: 0.9rem;
color: #757575;
margin-bottom: 1rem;
}

.booking-card .btn {
padding: 0.6rem 1.2rem;
font-size: 0.9rem;
}

/* Important Info Section (Generic Tab) */
.important-info-card {
background: #FFFFFF;
border-radius: 15px;
box-shadow: 0 5px 15px rgba(0,0,0,0.08);
padding: 2rem;
margin-bottom: 2rem;
border: 1px solid #E0E0E0;
}

.important-info-card p {
margin-bottom: 1rem;
color: #212121;
}

.important-info-card p strong {
color: #0059A6;
font-weight: 600;
}

/* Footer for result page */
.result-footer {
text-align: center;
font-size: 0.85rem;
color: #9e9e9e;
margin-top: 4rem;
padding-bottom: 2rem;
}

/* Tabs */
.result-tabs {
display: flex;
margin-bottom: 1.5rem;
border-bottom: 1px solid #c2c2c2;
flex-wrap: wrap; /* Allow tabs to wrap */
}

.result-tab-button {
padding: 0.75rem 1rem;
font-size: 1.125rem;
font-weight: 600;
color: #0059A6;
background: none;
border: none;
cursor: pointer;
outline: none;
transition: all 0.3s ease;
flex-grow: 1; /* Allow tabs to grow and fill space */
text-align: center;
}

.result-tab-button:hover {
color: #EC008C;
}

.result-tab-button.active {
border-bottom: 3px solid #EC008C;
color: #EC008C;
}

.result-tab-content {
display: none;
}

/* Buttons for Download/Share (used on result.php) */
/* Reusing the main btn-gradient style for these buttons as well */
/* Ensure these styles are consistent with the main form button if they share the class */
/* If these are separate buttons, they should have their own classes or be styled specifically */


/* Email Modal */
#emailModal {
position: fixed;
inset: 0;
background-color: rgba(0,0,0,0.6);
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
display: none; /* Hidden by default */
}

#emailModal > div {
background: #ffffff;
padding: 30px 25px;
max-width: 420px;
width: 90%;
border-radius: 10px;
box-shadow: 0 4px 20px rgba(0,0,0,0.2);
position: relative;
}

#emailModal h2 {
margin-top: 0;
color: #0072CE;
}

#emailModal p {
margin-bottom: 20px;
font-size: 1rem;
}

#emailModal input[type="email"] {
width: 100%;
padding: 10px;
border: 1px solid #c2c2c2;
border-radius: 6px;
margin-bottom: 15px;
font-size: 1rem;
}

#emailModal button {
background-color: #EC008C;
color: #fff;
padding: 12px;
font-size: 1rem;
border: none;
border-radius: 6px;
cursor: pointer;
}

#emailModal button:hover {
background-color: #C60074;
}

#emailError {
color: #EC008C;
font-size: 0.875rem;
margin-top: 10px;
}

/* Editing Mode Banner */
.editing-mode-banner {
background-color: #AD76BA;
color: #FFFFFF;
padding: 0.75rem 1.5rem;
border-radius: 10px;
text-align: center;
margin-bottom: 1.5rem;
font-size: 0.9rem;
font-weight: 500;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
display: flex; /* Changed to flex for centering */
justify-content: center;
align-items: center;
gap: 15px;
flex-wrap: wrap; /* Allow content to wrap */
}

/* Autosave Indicator */
.autosave-indicator {
position: fixed;
bottom: 20px;
right: 20px;
background-color: #424242;
color: #FFFFFF;
padding: 10px 15px;
border-radius: 8px;
font-size: 0.9rem;
box-shadow: 0 4px 12px rgba(0,0,0,0.2);
z-index: 10000;
display: none;
opacity: 0;
transition: opacity 0.3s ease-in-out;
}

.autosave-indicator.saving {
background-color: #0072CE;
opacity: 1;
}

.autosave-indicator.success {
background-color: #28a745;
opacity: 1;
}

.autosave-indicator.error {
background-color: #dc3545;
opacity: 1;
}

/* Visual Cues for Editable Fields (initial state, before login/edit mode) */
.editable-content {
cursor: pointer;
border-bottom: 1px dashed rgba(0,0,0,0.2);
padding-bottom: 2px;
transition: all 0.2s ease-in-out;
}

.editable-content:hover {
background-color: #e0e0e0; /* Changed to gray-200 for a lighter hover effect */
border-color: #0072CE;
}

/* Styling for editable input fields once in edit mode */
.editable-field {
border: 1px solid #0072CE !important;
border-radius: 5px;
padding: 5px 8px;
background-color: #E3F2FD;
font-weight: 500;
color: #212121;
width: auto;
display: inline-block;
box-sizing: border-box;
}

/* Specific adjustments for textarea */
textarea.editable-field {
width: 100%;
min-height: 80px;
resize: vertical;
}

/* Adjustments for image keyword input */
.image-keyword-input {
width: 100%;
margin-top: 5px;
}

/* Hide image if no keyword in edit mode */
.activity-card-image[src*="placehold.co"] {
display: none;
}

/* Google Sign-in Modal Specific Styles */
#googleSignInModal {
position: fixed;
inset: 0;
background-color: rgba(0,0,0,0.75);
display: flex; /* Changed to flex for centering */
justify-content: center;
align-items: center;
z-index: 10000;
opacity: 1;
display: none; /* Crucial: Hidden by default */
transition: opacity 0.3s ease-in-out;
}

#googleSignInModal > div {
background: #ffffff;
padding: 40px 30px;
max-width: 450px;
width: 90%;
border-radius: 15px;
box-shadow: 0 10px 40px rgba(0,0,0,0.4);
position: relative;
box-sizing: border-box;
text-align: center;
}

#googleSignInModal .close-button {
position: absolute;
top: 15px;
right: 15px;
background: none;
border: none;
cursor: pointer;
padding: 8px;
color: #757575;
transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
}

#googleSignInModal .close-button:hover {
color: #EC008C;
background-color: #f0f0f0;
transform: rotate(90deg);
}

#googleSignInModal .close-button svg {
width: 28px;
height: 28px;
}

#googleSignInModal h2 {
font-size: 2.2rem;
margin-bottom: 1rem;
color: #0072CE;
}

#googleSignInModal p {
font-size: 1.1rem;
margin-bottom: 2rem;
color: #424242;
}

#googleSignInModal #google-sign-in-button {
width: 100%;
max-width: 280px;
margin: 0 auto;
padding: 12px 20px;
font-size: 1.1rem;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
background: linear-gradient(to right, #4285F4, #34A853);
box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

#googleSignInModal #google-sign-in-button:hover {
background: linear-gradient(to right, #357AE8, #2C8C46);
transform: translateY(-1px);
box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

#googleSignInModal #google-sign-in-button img {
width: 22px;
height: 22px;
}

/* --- Ultra-Subtle styles for Editable Fields in result.php --- */
.editable-field {
padding: 2px 0px;
border: 1px solid transparent !important;
border-radius: 3px;
transition: background-color 0.2s ease, border-color 0.2s ease;
cursor: text;
min-height: 1.5em;
display: inline-block;
box-sizing: border-box;
background-color: transparent !important;
vertical-align: top;
}

.editable-field:hover {
background-color: #e0e0e0; /* Changed to gray-200 for a lighter hover effect */
border-color: #c2c2c2;
}

.editable-field:focus {
background-color: transparent !important;
border: none !important;
box-shadow: none !important;
outline: none !important;
}

/* Specific styling for input/textarea elements that become editable */
.day-number-input,
.day-placeholder-input,
.time-slot-input,
.activity-description-input,
.tour-link-input,
.image-keyword-input {
width: auto;
max-width: 100%;
padding: 2px 0px;
border: 1px solid transparent !important;
border-radius: 3px;
transition: all 0.2s ease;
box-sizing: border-box;
font-family: 'Lexend', sans-serif;
font-size: inherit;
color: inherit;
background-color: transparent !important;
}

.day-number-input:focus,
.day-placeholder-input:focus,
.time-slot-input:focus,
.activity-description-input:focus,
.tour-link-input:focus,
.image-keyword-input:focus {
border: none !important;
background-color: transparent !important;
box-shadow: none !important;
outline: none !important;
}

/* Adjustments for contentEditable elements within specific contexts */
#overview-text.editable-field {
display: block;
width: 100%;
}


/* Confirmation Modal for Re-entering Edit Mode Specific Styles */
#confirmEditModal {
position: fixed;
inset: 0;
background-color: rgba(0,0,0,0.75);
display: flex;
justify-content: center;
align-items: center;
z-index: 10000;
opacity: 1;
display: none; /* Crucial: Hidden by default */
transition: opacity 0.3s ease-in-out;
}

#confirmEditModal > div {
background: #ffffff;
padding: 40px 30px;
max-width: 450px;
width: 90%;
border-radius: 15px;
box-shadow: 0 10px 40px rgba(0,0,0,0.4);
position: relative;
box-sizing: border-box;
text-align: center;
}

#confirmEditModal .close-button {
position: absolute;
top: 15px;
right: 15px;
background: none;
border: none;
cursor: pointer;
padding: 8px;
color: #757575;
transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
}

#confirmEditModal .close-button:hover {
color: #EC008C;
background-color: #f0f0f0;
transform: rotate(90deg);
}

#confirmEditModal .close-button svg {
width: 28px;
height: 28px;
}

#confirmEditModal h2 {
font-size: 2.2rem;
margin-bottom: 1rem;
color: #0072CE;
}

#confirmEditModal p {
font-size: 1.1rem;
margin-bottom: 2rem;
color: #424242;
}

#confirmEditModal .btn-secondary,
#confirmEditModal .btn-gradient {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 12px 20px;
font-size: 1.1rem;
border-radius: 8px;
box-shadow: 0 4px 10px rgba(0,0,0,0.2);
transition: all 0.2s ease-in-out;
}

#confirmEditModal .btn-secondary {
background-color: #FFFFFF;
color: #0072CE;
border: 2px solid #0072CE;
box-shadow: 0 4px 10px rgba(0, 114, 206, 0.2);
}

#confirmEditModal .btn-secondary:hover {
background-color: #0072CE;
color: white;
transform: translateY(-1px);
box-shadow: 0 6px 12px rgba(0, 114, 206, 0.3);
}

/* New: Reset Confirmation Modal Specific Styles */
#resetConfirmModal {
position: fixed;
inset: 0;
background-color: rgba(0,0,0,0.75);
display: flex;
justify-content: center;
align-items: center;
z-index: 10000;
opacity: 1;
display: none; /* Crucial: Hidden by default */
transition: opacity 0.3s ease-in-out;
}

#resetConfirmModal > div {
background: #ffffff;
padding: 40px 30px;
max-width: 450px;
width: 90%;
border-radius: 15px;
box-shadow: 0 10px 40px rgba(0,0,0,0.4);
position: relative;
box-sizing: border-box;
text-align: center;
}

#resetConfirmModal .close-button {
position: absolute;
top: 15px;
right: 15px;
background: none;
border: none;
cursor: pointer;
padding: 8px;
color: #757575;
transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
}

#resetConfirmModal .close-button:hover {
color: #EC008C;
background-color: #f0f0f0;
transform: rotate(90deg);
}

#resetConfirmModal .close-button svg {
width: 28px;
height: 28px;
}

#resetConfirmModal h2 {
font-size: 2.2rem;
margin-bottom: 1rem;
color: #EC008C;
}

#resetConfirmModal p {
font-size: 1.1rem;
margin-bottom: 2rem;
color: #424242;
}

#resetConfirmModal .btn-secondary,
#resetConfirmModal .btn-danger {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 12px 20px;
font-size: 1.1rem;
border-radius: 8px;
box-shadow: 0 4px 10px rgba(0,0,0,0.2);
transition: all 0.2s ease-in-out;
}

#resetConfirmModal .btn-secondary {
background-color: #FFFFFF;
color: #0072CE;
border: 2px solid #0072CE;
box-shadow: 0 4px 10px rgba(0, 114, 206, 0.2);
}

#resetConfirmModal .btn-secondary:hover {
background-color: #0072CE;
color: white;
transform: translateY(-1px);
box-shadow: 0 6px 12px rgba(0, 114, 206, 0.3);
}

/* New: Share Options Modal Specific Styles */
#shareModal {
position: fixed;
inset: 0;
background-color: rgba(0,0,0,0.6);
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
display: none; /* Crucial: Hidden by default */
}

#shareModal > div {
background: #ffffff;
padding: 2.5rem;
max-width: 450px;
width: 90%;
border-radius: 15px;
box-shadow: 0 10px 30px rgba(0,0,0,0.3);
position: relative;
text-align: center;
}

#shareModal .close-button {
position: absolute;
top: 15px;
right: 15px;
background: none;
border: none;
cursor: pointer;
padding: 8px;
color: #757575;
transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
}

#shareModal .close-button:hover {
color: #EC008C;
background-color: #f0f0f0;
transform: rotate(90deg);
}

#shareModal .close-button svg {
width: 28px;
height: 28px;
}

#shareModal h2 {
font-size: 2.2rem;
margin-bottom: 1rem;
color: #0072CE;
}

#shareModal p {
font-size: 1.1rem;
margin-bottom: 2rem;
color: #424242;
}

#shareableLinkInput {
background-color: #f5f5f5;
border: 1px solid #c2c2c2;
color: #212121;
font-weight: 500;
}

#shareModal .btn-gradient {
margin-top: 1rem;
}

.drag-handle-icon {
width: 18px;
height: 18px;
color: #888;
cursor: grab;
margin-left: 10px;
vertical-align: middle;
opacity: 0.6;
transition: opacity 0.2s ease, color 0.2s ease;
}

.drag-handle-icon {
display: inline-block;
}

.drag-handle-icon:hover {
opacity: 1;
color: #555;
}

.dragging-day .drag-handle-icon {
cursor: grabbing;
color: #007bff;
}

/* --- Featured Trips Section Styles (for index.html) - USING FLEXBOX --- */

/* The outer container is now handled by .form-container */
.featured-trips-section-inner {
padding: 0;
text-align: center;
}

.featured-trips-heading {
color: #343a40;
font-size: 2.5rem;
margin-bottom: 2.5rem;
font-weight: 700;
}

.featured-trips-grid {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 25px;
}

.featured-trip-card {
display: flex;
flex-direction: column;
background-color: #ffffff;
border-radius: 12px;
overflow: hidden;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
text-decoration: none;
color: inherit;
flex: 1 1 calc(25% - 25px);
max-width: calc(25% - 25px);
min-width: 200px;
}

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

.card-image-wrapper {
width: 100%;
height: 180px;
overflow: hidden;
}

.card-image {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.3s ease-in-out;
}

.featured-trip-card:hover .card-image {
transform: scale(1.05);
}

.card-content {
padding: 20px;
text-align: left;
flex-grow: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
}

.card-content h3 {
font-size: 1.6rem;
color: #007bff;
margin-bottom: 10px;
line-height: 1.3;
word-break: break-word;
overflow-wrap: break-word;
}

.card-tags {
margin-top: 15px;
display: flex;
flex-wrap: wrap;
gap: 8px;
}

.card-tags .tag {
background-color: #e0f2f7;
color: #007bff;
padding: 6px 12px;
border-radius: 20px;
font-size: 0.9rem;
font-weight: 500;
white-space: nowrap;
}

/* Styles for loading/error messages within the flex container */
.loading-trips,
.error-message {
text-align: center;
width: 100%;
font-size: 1.2rem;
color: #6c757d;
padding: 30px;
}

.error-message {
color: #dc3545;
}

/* Responsive Typography – Tablet */
@media (max-width:1024px) {
h1{font-size: 2.5rem;}
h2{font-size: 2rem;}
h3{font-size: 1.5rem;}
h4{font-size: 1.25rem;}
h5{font-size: 1rem;}
h6{font-size: 0.875rem;}
p{font-size:0.875rem;}
}

/* Responsive Adjustments for Flexbox (Featured Trips) */
@media (max-width: 1200px) {
.featured-trip-card {flex: 1 1 calc(33.333% - 25px); max-width: calc(33.333% - 25px);}
}

@media (max-width: 992px) {
.featured-trip-card{flex: 1 1 calc(50% - 25px); max-width: calc(50% - 25px);}
.featured-trips-heading{font-size: 2rem;}
.featured-trips-section-inner{padding: 1.5rem;}
.form-container, .itinerary-container {padding: 30px 4%;}

/* Buttons on 992px */
/* .btn-gradient styles are handled globally and then overridden below for smaller screens */
}

@media (max-width: 768px) {
/* Responsive Typography – Mobile */
h1{font-size: 2rem;}
h2{font-size: 1.5rem;}
h3{font-size:1.25rem;}
h4{font-size: 1rem;}
h5{font-size: 0.875rem;}
h6{font-size: 0.75rem;}
p{font-size: 0.875rem;}

/* Body adjustments for mobile */
body{justify-content:flex-start; padding:0.5rem; align-items:stretch;}
.form-container {
max-width: 95%; 
padding: 1.5rem;
margin: 1rem auto; /* Adjust margin for mobile */
}

/* NEW: Make the top three form fields stack vertically on mobile */
.form-top-fields-wrapper {
flex-direction: column; /* Stack items vertically */
gap: 1rem; /* Adjust gap for vertical stacking */
}

/* Ensure each form field group takes full width on mobile */
.form-top-fields-wrapper .form-field-group {
width: 100%;
flex: none; /* Remove flex grow/shrink on mobile */
}

/* Adjust form label font size for mobile readability if needed */
.form-label {
font-size: 0.95rem; /* Slightly smaller labels on mobile */
}

/* Featured Trips - Single Column */
.featured-trip-card {
flex: 1 1 100%;
max-width: 400px; /* Constrain card width on small screens for readability */
}

.card-image-wrapper {
height: 200px;
}

/* General adjustments for 768px */
.hero-section h1 {
font-size: 2.5rem;
}

.hero-section p {
font-size: 0.95rem;
}

.featured-trips-heading {
font-size: 1.8rem;
}

.header {
flex-direction: column;
align-items: flex-start;
padding: 10px 3%;
}

.logo {
margin-bottom: 10px;
}

.main-nav ul {
flex-direction: column;
align-items: flex-start;
width: 100%;
gap: 10px;
}

/* Stack buttons vertically on smaller screens */
.button-group {
flex-direction: column; /* Stack buttons vertically */
gap: 15px;
}

/* Make buttons full width when stacked */
.btn-gradient,
.btn-primary, /* If you use these classes on index.html buttons */
.btn-secondary { /* If you use these classes on index.html buttons */
width: 100%; /* Full width buttons */
max-width: 300px; /* Constrain width */
margin: 0 auto;
}

.day-header h3 {
font-size: 1.2rem;
}

.activity-description-display {
font-size: 1.1rem;
}

.activity-card {
flex-direction: column; /* Stack image and content */
align-items: center;
text-align: center;
}

.activity-card-content {
width: 100%;
flex-basis: auto;
min-width: auto;
}

.activity-card-image-container {
width: 100%; /* Full width image */
height: 150px; /* Adjust height */
margin-left: 0;
margin-top: 15px; /* Space from content */
}

.modal-content {
width: 95%; /* Wider modal on small screens */
padding: 20px;
}

.modal-content h2 {
font-size: 20px;
}

.logo-part, .formcont{width:100%; display:table;}
.fieldgrp, .fieldgrp-last{width:100%; float:left; margin-right:0px;}
.logo-part h2{font-size:24px; line-height:32px;}

}

@media (max-width: 480px) {
h1 {
font-size: 1.8rem;
}

h2 {
font-size: 1.4rem;
}

.hero-section h1 {
font-size: 2rem;
}

.hero-section p {
font-size: 0.9rem;
}

.featured-trips-heading {
font-size: 1.6rem;
}

.day-header h3 {
font-size: 1.1rem;
}

.activity-description-display {
font-size: 1rem;
}

.activity-card-image-container {
height: 120px; /* Smaller image on very small screens */
}

/* Buttons on very small screens */
.btn-gradient, .btn-primary, .btn-secondary {
padding: 10px 20px; /* Smaller padding for buttons */
font-size: 0.9rem; /* Smaller font for buttons */
}

}

.loadingspinner{display:inline-block; width:20px; height:20px; border:3px solid rgba(0,0,0,.3); border-radius:50%; border-top-color:#000; animation:spin 1s ease-in-out infinite; -webkit-animation:spin 1s ease-in-out infinite;}

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

/* Floating Button - General Styles (if not already there) */
.floating-button {
    position: fixed;
    bottom: 20px;
    right: 20px; /* Adjust if you have another floating button on the right */
    background-color: #EC008C; /* Primary pink - Example */
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.floating-button:hover {
    background-color: #D4007B; /* Darker pink - Example */
    transform: translateY(-2px);
}
.floating-button i {
    font-size: 18px;
}

/* Specific style for the chat button if you want it different from Request Quote */
.floating-button.chat-button {
    background-color: #0072CE; /* Secondary blue - Example */
    right: 90px; /* Adjust position if you have a "Request Quote" button at 20px */
}

.floating-button.chat-button:hover {
    background-color: #0059A6; /* Darker blue - Example */
}


/* IMPORTANT: Ensure your general .modal style is correct */
.modal {
    display: none; /* This hides the modal by default */
    position: fixed;
    z-index: 2000; /* Ensure it's on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    align-items: center; /* Used when display: flex is set by JS */
    justify-content: center; /* Used when display: flex is set by JS */
    /* Make sure there is NO `display: flex;` here */
}

/* Chat specific styles - adjusted to complement your page's palette */
.chat-container {
    height: calc(100vh - 4rem); /* Fixed height for chat container */
    max-height: 100vh;
    width: 90%; /* Adjust as needed */
    max-width: 600px; /* Max width for chat modal */
}

#chatArea::-webkit-scrollbar {
  width: 6px;
}
#chatArea::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}
#chatArea::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}
#chatArea::-webkit-scrollbar-thumb:hover {
  background: #555;
}
.loading-dots {
  display: inline-block;
  position: relative;
  width: 30px;
  height: 10px;
  margin-left: 10px;
}
.loading-dots div {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #2196F3; /* Primary blue for loading dots */
  border-radius: 50%;
  animation: dot-pulse 1.5s infinite ease-in-out;
}
.loading-dots div:nth-child(1) {
  left: 0;
  animation-delay: -0.32s;
}
.loading-dots div:nth-child(2) {
  left: 10px;
  animation-delay: -0.16s;
}
.loading-dots div:nth-child(3) {
  left: 20px;
  animation-delay: 0s;
}
@keyframes dot-pulse {
  0%, 80%, 100% { transform: scale(0); opacity: 0; }
  40% { transform: scale(1); opacity: 1; }
}
/* Message bubble styling */
.msg {
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 8px;
  max-width: 85%; /* Limit message width */
  font-size: 14px;
  line-height: 1.5;
  clear: both; /* Clear floats for proper stacking */
}

.user-msg {
  background: #E91E63; /* Vibrant pink for user messages */
  color: white;
  float: right; /* Align to right */
  border-bottom-right-radius: 2px; /* Small corner adjustment */
}

.ai-msg {
  background: #E3F2FD; /* Light blue for AI messages */
  color: #2c3e50;
  float: left; /* Align to left */
  border-bottom-left-radius: 2px; /* Small corner adjustment */
}

.chat-send-button {
    background-color: #2196F3; /* Primary blue for chat send button */
}
.chat-send-button:hover {
    background-color: #1976D2; /* Darker blue on hover */
}

/* Style for suggested buttons */
.suggested-btn {
    background-color: #81C784; /* Light green for suggestions */
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    margin: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-weight: 500;
    display: inline-block; /* Allows them to sit side-by-side */
    border: none; /* Remove default button border */
}
.suggested-btn:hover {
    background-color: #66BB6A; /* Darker green on hover */
}

/* Floating button for chat */
.floating-button.chat-button {
    background-color: #0072CE; /* Secondary blue */
    right: 90px; /* Adjust position if you have a "Request Quote" button at 20px */
}
.floating-button.chat-button:hover {
    background-color: #0059A6; /* Darker blue */
}