/* 1. THEME VARIABLES */
:root {
    --yale-blue: #1B4079;
    --air-force-blue: #4D7C8A;
    --mindaro-accent: #CBDF90;
    --dark-blue-bg: #0A192F;
    --max-width: 1000px;

    /* Light Mode Palette */
    --bg-main: #f4f7f9;
    --bg-content: #FFFFFF;
    --text-primary: #111111;
    --text-secondary: #555555;
    --border-color: #e5e5e5;
    --sidebar-bg: var(--yale-blue);
    --sidebar-text: #FFFFFF;
}

.dark-mode {
    /* Dark Mode Palette */
    --bg-main: var(--dark-blue-bg);
    --bg-content: #1e1e1e;
    --text-primary: #e5e5e5;
    --text-secondary: #bbbbbb;
    --border-color: #333333;
    --sidebar-bg: #051021;
}

/* 2. GENERAL STYLES */
html, body {
    height: 100%;
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow: hidden;
    transition: background-color 0.3s, color 0.3s;
}

/* 3. THEME TOGGLE & SIDEBAR */
.theme-toggle {
    background: none; border: none; font-size: 1.2rem; cursor: pointer; position: relative; width: 24px; height: 24px;
}
.theme-toggle.top-right { position: fixed; top: 15px; right: 15px; z-index: 1001; }
.theme-toggle .fa-sun { color: #f39c12; }
.theme-toggle .fa-moon { color: #f1c40f; }
.theme-toggle i { position: absolute; top: 0; left: 0; transition: transform 0.3s, opacity 0.3s; }
.dark-mode .theme-toggle .fa-sun { transform: scale(0); opacity: 0; }
.dark-mode .theme-toggle .fa-moon { transform: scale(1); opacity: 1; }
.dark-mode .theme-toggle .fa-moon:hover { text-shadow: 0 0 10px var(--mindaro-accent); }
body:not(.dark-mode) .theme-toggle .fa-sun { transform: scale(1); opacity: 1; }
body:not(.dark-mode) .theme-toggle .fa-sun:hover { text-shadow: 0 0 10px var(--yale-blue); }
body:not(.dark-mode) .theme-toggle .fa-moon { transform: scale(0); opacity: 0; }
.sidebar {
    position: fixed; top: 0; left: -280px; width: 280px; height: 100%;
    background-color: var(--sidebar-bg); color: var(--sidebar-text);
    padding: 20px; box-sizing: border-box;
    transition: left 0.3s ease-in-out; z-index: 1000;
}
body.sidebar-open .sidebar { left: 0; }
.sidebar .logo { color: var(--sidebar-text); font-size: 1.5rem; font-weight: bold; text-decoration: none; margin-bottom: 30px; }
.sidebar-nav ul { list-style: none; padding: 0; margin: 0; }
.sidebar-nav li a { color: var(--sidebar-text); text-decoration: none; display: block; padding: 10px 0; font-size: 1.1rem; }
.burger-menu {
    position: fixed; top: 15px; left: 15px;
    background: none; border: none; font-size: 2rem;
    cursor: pointer; z-index: 999; color: inherit;
}
/** Sidebar logo

/* 4. CHAT AREA & STATIC PREVIEW PAGE STYLES */
.chat-window {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px;
    height: 100vh;
    box-sizing: border-box;
    overflow-y: auto;
	 padding-bottom: 150px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.chat-window::-webkit-scrollbar {
    display: none;
}
.welcome-message {
    text-align: center; background: transparent; border: none;
    margin: auto; max-width: 100%;
}
.welcome-heading { font-size: 2rem; color: var(--yale-blue); margin-bottom: 5px; }
.dark-mode .welcome-heading { color: var(--mindaro-accent); }
.welcome-tagline { font-size: 1.1rem; color: var(--text-secondary); margin-top: 0; }

.trip-summary-card, .destination-overview-card, .itinerary-display-card {
    background-color: var(--bg-content);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px 40px;
    margin-bottom: 30px;
    width: 100%;
    max-width: var(--max-width);
    box-sizing: border-box;
}
.dark-mode .trip-summary-card, 
.dark-mode .destination-overview-card, 
.dark-mode .itinerary-display-card {
    background-color: var(--dark-blue-bg);
    border-color: #333;
}
.trip-summary-card h3 {
    margin-top: 0; font-size: 1.5rem; color: var(--yale-blue);
    border-bottom: 1px solid var(--border-color); padding-bottom: 10px;
}
.dark-mode .trip-summary-card h3 { color: var(--mindaro-accent); }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; margin: 20px 0; }
.summary-item { display: flex; flex-direction: column; }
.summary-item strong { font-size: 0.9rem; color: var(--text-secondary); text-transform: uppercase; margin-bottom: 5px; display: flex; align-items: center; gap: 5px; }
.summary-item span { font-size: 1.1rem; font-weight: bold; text-transform: capitalize; }
.summary-interests { margin-top: 10px; }
.summary-interests strong { font-size: 0.9rem; color: var(--text-secondary); text-transform: uppercase; margin-right: 10px; }
.interest-tag { display: inline-block; background-color: var(--air-force-blue); color: #fff; padding: 5px 10px; border-radius: 15px; font-size: 0.9rem; margin: 5px 5px 5px 0; }
.destination-overview-card h2 { margin-top: 0; }

/* 5. ITINERARY DISPLAY STYLES */
.itinerary-display-card h2 { font-size: 1.8rem; text-align: left; margin-top: 0; }
.itinerary-day { font-size: 1.6rem; color: var(--mindaro-accent); border-bottom: 2px solid var(--air-force-blue); padding-bottom: 8px; margin-top: 25px; margin-bottom: 5px; background-color: transparent; border-radius: 0; }
body:not(.dark-mode) .itinerary-day { color: var(--yale-blue); }
.map-link { display: inline-block; margin: 5px 0 15px 5px; font-size: 0.9rem; color: var(--air-force-blue); text-decoration: none; font-weight: bold; }
.map-link:hover { text-decoration: underline; }
.map-link i { margin-right: 5px; }
.itinerary-period { font-size: 0.9rem; color: var(--text-secondary); text-transform: uppercase; font-weight: 600; margin-top: 20px; margin-bottom: 10px; }
.itinerary-display-card ul { list-style: none; padding-left: 5px; margin: 0; }
.itinerary-activity { padding: 10px 5px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border-color); }
.itinerary-activity:last-child { border-bottom: none; }
.itinerary-activity i { color: var(--air-force-blue); width: 20px; text-align: center; font-size: 1.1rem; }
.itinerary-actions { margin-top: 25px; display: flex; gap: 10px; }
.action-btn { flex-grow: 1; padding: 10px; border-radius: 6px; border: 1px solid var(--air-force-blue); background: none; color: var(--air-force-blue); cursor: pointer; font-weight: bold; transition: all 0.3s; }
.action-btn.book-btn { background: var(--air-force-blue); color: #fff; }
.action-btn:hover { opacity: 0.8; }

/* 6. CHAT INPUT & FOOTER (Used on initial page) */
.chat-form-wrapper { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: var(--max-width); padding: 10px 20px; box-sizing: border-box; background-color: var(--bg-main); z-index: 10; border-top: none; }
.chat-form { padding: 0; }
.input-wrapper { position: relative; width: 100%; }
#chat-input { width: 100%; border: 1px solid var(--border-color); border-radius: 8px; padding: 15px 50px 15px 20px; font-size: 1rem; background-color: var(--bg-main); color: inherit; box-sizing: border-box; }
#chat-input:focus { border-color: var(--air-force-blue); outline: none; }
.send-icon-button { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--air-force-blue); font-size: 1.2rem; cursor: pointer; padding: 5px; transition: color 0.3s, transform 0.2s; }
.send-icon-button:hover { color: #5a9aaa; transform: translateY(-50%) scale(1.1); }
.chat-footer { text-align: center; padding-top: 5px; font-size: 0.8rem; color: #888; }
.chat-footer a { color: #888; text-decoration: none; font-weight: bold; }
.chat-footer a:hover { text-decoration: underline; }

/* 7. MODAL STYLES (Trip & Share) */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(10, 25, 47, 0.7);
    display: none; justify-content: center; align-items: center;
    z-index: 2000; opacity: 0; transition: opacity 0.3s ease; backdrop-filter: blur(5px);
}
.modal-content {
    position: relative; background-color: var(--light-bg); color: var(--dark-text);
    padding: 30px; border-radius: 12px; width: 90%; max-width: 500px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); transform: scale(0.9); transition: transform 0.3s ease;
    border-top: 5px solid var(--air-force-blue);
}
.dark-mode .modal-content { background-color: var(--dark-blue-bg); }
.close-modal-btn {
    position: absolute; top: 10px; right: 10px; background: var(--bg-main);
    border: 1px solid var(--border-color); width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 1rem;
    color: var(--text-secondary); cursor: pointer; transition: all 0.3s;
}
.close-modal-btn:hover { color: var(--yale-blue); transform: rotate(90deg) scale(1.1); border-color: var(--yale-blue); }
.dark-mode .close-modal-btn:hover { color: var(--mindaro-accent); border-color: var(--mindaro-accent); }
.modal-overlay.visible { display: flex; opacity: 1; }
.modal-overlay.visible .modal-content { transform: scale(1); }
.modal-content h2 { margin-top: 0; color: var(--yale-blue); }
.dark-mode .modal-content h2 { color: var(--mindaro-accent); }
.modal-content p { margin-bottom: 20px; color: var(--text-secondary); }
#details-form label, #user-details-form label { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-weight: bold; }
#details-form input, #details-form select, #details-form textarea,
#user-details-form input { 
    width: 100%; padding: 12px; border: 1px solid var(--border-color); background-color: var(--bg-main); color: inherit; 
    border-radius: 6px; box-sizing: border-box; margin-bottom: 15px; font-family: inherit; 
}
.radio-group, .checkbox-group { display: flex; flex-wrap: wrap; gap: 15px; margin-bottom: 15px; border: 1px solid var(--border-color); padding: 10px; border-radius: 6px; }
.radio-group label, .checkbox-group label { display: flex; align-items: center; gap: 5px; font-weight: normal; }
.generate-button { width: 100%; padding: 12px; background-color: var(--air-force-blue); color: #FFFFFF; border: none; border-radius: 6px; font-size: 1.1rem; font-weight: bold; cursor: pointer; transition: background-color 0.3s ease; }
.generate-button:hover { background-color: #5a9aaa; }
.form-row { display: flex; gap: 15px; }
.form-group { flex: 1; }
#details-form textarea { resize: vertical; }

/* 8. SHARE MODAL SPECIFIC STYLES */
.share-options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 20px; }
.share-option-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; font-size: 1rem; font-weight: bold; color: var(--text-primary); background-color: var(--bg-main); border: 1px solid var(--border-color); border-radius: 8px; cursor: pointer; transition: all 0.3s ease; }
.share-option-btn:hover { border-color: var(--air-force-blue); color: var(--air-force-blue); transform: translateY(-3px); }
.share-option-btn i { font-size: 2rem; color: var(--air-force-blue); }
#user-details-view form { margin-top: 20px; }

/* Add this to the end of chat-style.css */
#share-options-view.details-required .share-option-btn {
    opacity: 0.6;
    cursor: not-allowed;
}

#share-options-view.details-required .share-option-btn:hover {
    transform: none; /* Disable hover effect */
    border-color: var(--border-color);
    color: var(--text-primary);
}


/* 9. MOBILE RESPONSIVENESS */
@media (max-width: 768px) {
    
    /* --- SCROLLING FIX (Yeh Code Add Karein) --- */
    html, body {
        overflow-y: auto !important;   /* Scroll ko force enable karein */
        overflow-x: hidden !important;
        height: auto;                 /* Height ko content ke hisab se set karein */
        min-height: 100vh;
    }
 

    /* --- Original Styles (Keep These) --- */
    .chat-window { padding: 60px 20px 50px; }
    .trip-summary-card, .destination-overview-card, .itinerary-display-card { padding: 15px 20px; }
    .burger-menu { font-size: 1.5rem; }
}

 /* --- ADD THESE NEW STYLES FOR THE POP-UP --- */
    
    /* Make the pop-up content wider on mobile */
    .modal-content {
        width: 90%;
        padding: 20px;
		
		 /* ADD THESE TWO LINES */
        max-height: 85vh; /* Limit height to 85% of the screen's height */
        overflow-y: auto; /* Add vertical scroll ONLY if needed */
        overflow-x: hidden
    } 
    
 /* ========================================================= */
/* == FINAL FIX (SMALLER SIZE) FOR RADIO/CHECKBOX         == */
/* ========================================================= */

/* --- Parent Label Ki Styling --- */
.radio-group label,
.checkbox-group label {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important; /* Changed: Thoda kam gap */
    margin-bottom: 15px !important;
    cursor: pointer !important;
    font-size: 16px !important;
}

/* --- Actual Input Element Ki Styling --- */
.radio-group input[type="radio"],
.checkbox-group input[type="checkbox"] {
    /* Step 1: Remove default browser style */
    appearance: none !important;
    -webkit-appearance: none !important;
    
    /* Step 2: Force the custom size and border */
    margin: 0 !important; 
    width: 15px !important;  /* Changed: Size chota kiya */
    height: 15px !important; /* Changed: Size chota kiya */
    border: 2px solid #5a5a5a !important;
    transition: all 0.2s ease-in-out !important;
    flex-shrink: 0 !important;
    position: relative !important;
    background-color: transparent !important; 
}

/* --- Force the Radio Button to be a Circle --- */
.radio-group input[type="radio"] {
    border-radius: 50% !important;
}

/* --- Force the Checkbox to be a Square --- */
.checkbox-group input[type="checkbox"] {
    border-radius: 3px !important; /* Changed: Thoda kam radius */
}

/* --- WHEN RADIO BUTTON IS 'CHECKED' --- */
.radio-group input[type="radio"]:checked {
    border-color: #007bff !important;
}

/* The inner dot for the checked state */
.radio-group input[type="radio"]:checked::before {
    content: '' !important;
    display: block !important;
    width: 8px !important;   /* Changed: Inner dot bhi chota kiya */
    height: 8px !important;  /* Changed: Inner dot bhi chota kiya */
    background-color: #007bff !important;
    border-radius: 50% !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

/* --- WHEN CHECKBOX IS 'CHECKED' --- */
.checkbox-group input[type="checkbox"]:checked {
    border-color: #007bff !important;
    background-color: #007bff !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}
/* Styles for the Rate Limit Timer */
.rate-limit-container {
    text-align: center;
    margin: auto;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-content);
}

.rate-limit-container h2 {
    font-size: 1.5rem;
    color: var(--yale-blue);
}
.dark-mode .rate-limit-container h2 {
    color: var(--mindaro-accent);
}

.timer-countdown {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--air-force-blue);
    margin-top: 10px;
}

