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

/* Logo in top right corner */
.top-right-logo {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-logo {
    max-width: 80px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Top Header Rectangle */
.top-header-rectangle {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    min-width: 600px;
    max-width: 95%;
    height: auto;
    min-height: 40px;
    background-color: #ffffff;
    border: 2px solid #000000;
    border-radius: 15px;
    z-index: 9998;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 6px 12px;
}

.top-header-menu-content {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    justify-content: center;
}

.top-header-menu-item {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Top Header Toggle Buttons */
.top-header-toggle-btn {
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 500;
    font-family: 'Space Mono', monospace;
    color: #000000;
    background-color: #cccccc;
    border: 1.5px solid #000000;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap;
    min-height: 24px;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.top-header-toggle-btn:hover {
    background-color: #b0b0b0;
}

.top-header-toggle-btn.active {
    background-color: #000000;
    color: #ffffff;
}

.top-header-toggle-btn.active:hover {
    background-color: #333333;
}

.top-header-menu-item .zone-selector-dropdown {
    position: relative;
    bottom: 5px;
    min-width: 100px;
}

.top-header-menu-item .zone-selector-toggle {
    padding: 4px 8px;
    font-size: 11px;
    min-width: 70px;
    border: 1.5px solid #000000;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    line-height: 1.2;
}

.top-header-menu-item .top-header-btn {
    padding: 4px 8px;
    font-size: 11px;
    white-space: nowrap;
    border: 1.5px solid #000000;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    line-height: 1.2;
}

.top-header-menu-item .zone-selector-dropdown-content {
    top: 100%;
    left: 0;
    right: auto;
    margin-top: 5px;
    min-width: 150px;
    max-height: 200px;
    z-index: 10000;
}

body {
    font-family: 'Space Mono', monospace;
    height: 100vh;
    overflow: hidden;
    background-color: #ffffff;
    padding-bottom: 50px; /* Space for news ticker */
    margin: 0;
}

/* Ensure all buttons and inputs use Space Mono */
button,
input,
textarea,
select,
label {
    font-family: 'Space Mono', monospace;
}

/* Container - Main Layout */
.container {
    display: flex;
    width: 100%;
    height: calc(100vh - 50px); /* Account for news ticker height */
    border: 3px solid #000000;
    position: relative;
    z-index: 1;
    transition: margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar Tab (Folder-like Tab) */
.sidebar-tab {
    position: fixed;
    left: 0;
    bottom: 50px; /* Align with news ticker top */
    width: 35px;
    height: 70px;
    background-color: #ffffff;
    border: 2px solid #000000;
    border-left: none;
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
    cursor: pointer;
    z-index: 1002;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
}

.sidebar.open ~ .sidebar-tab,
body:has(.sidebar.open) .sidebar-tab {
    left: min(25%, 400px);
}

.sidebar-tab:hover {
    background-color: #f5f5f5;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.3);
}

.sidebar-tab .tab-icon {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.sidebar-tab .tab-text {
    display: none;
}

/* Left Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 52px; /* Raise bottom above news ticker */
    width: 25%;
    min-width: 250px;
    max-width: 400px;
    border-right: 2px solid #000000;
    border-bottom: none; /* Remove bottom border to prevent overlap with news ticker */
    display: flex;
    flex-direction: column;
    padding: 20px;
    background-color: #ffffff;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 998; /* Lower than news ticker (1001) */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-100%);
}

.sidebar.open {
    transform: translateX(0);
}

/* Adjust container and main content when sidebar is open */
body:has(.sidebar.open) .container {
    margin-left: 0;
}

/* Tab icon rotation when sidebar is open */
.sidebar.open ~ .sidebar-tab .tab-icon,
body:has(.sidebar.open) .sidebar-tab .tab-icon {
    transform: rotate(180deg) !important;
}

/* Input Section */
.input-section {
    margin-bottom: 30px;
}

.input-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #000000;
}

.input-section input {
    width: 100%;
    padding: 10px;
    border: 2px solid #000000;
    font-size: 14px;
    margin-bottom: 10px;
    background-color: #ffffff;
}

.input-section input:focus {
    outline: none;
    border-color: #333333;
}

.input-section button {
    width: 100%;
    padding: 10px;
    background-color: #000000;
    color: #ffffff;
    border: 2px solid #000000;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 4px;
}

.input-section button:hover {
    background-color: #333333;
}

.input-section button:active {
    background-color: #666666;
}

/* Chatbot Section */
.chatbot-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chatbot-header {
    margin-bottom: 15px;
}

.chatbot-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #000000;
    border-bottom: 2px solid #000000;
    padding-bottom: 8px;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    border: 2px solid #000000;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #ffffff;
    min-height: 200px;
    max-height: calc(100vh - 350px); /* Account for news ticker (50px) + header + input area */
}

.message {
    margin-bottom: 15px;
    padding: 10px;
    border-left: 3px solid #000000;
    padding-left: 12px;
}

.message.user {
    background-color: #f5f5f5;
}

.message.bot {
    background-color: #ffffff;
}

.message-content {
    font-size: 14px;
    line-height: 1.6;
    color: #000000;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.message-time {
    font-size: 11px;
    color: #666666;
    margin-top: 5px;
}

.message-actions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.show-message-btn {
    padding: 8px 16px;
    background-color: #000000;
    color: #ffffff;
    border: 2px solid #000000;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 4px;
}

.show-message-btn:hover {
    background-color: #000000;
}

.show-message-btn:disabled {
    background-color: #666666;
    cursor: not-allowed;
    opacity: 0.6;
}

.download-pdf-btn {
    padding: 8px 16px;
    background-color: #000000;
    color: #ffffff;
    border: 2px solid #000000;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 4px;
}

.download-pdf-btn:hover {
    background-color: #333333;
}

.download-pdf-btn:disabled {
    background-color: #666666;
    cursor: not-allowed;
}

/* Chatbot Input Area */
.chatbot-input-area {
    display: flex;
    gap: 10px;
}

.chatbot-input-area input {
    flex: 1;
    padding: 10px;
    border: 2px solid #000000;
    font-size: 14px;
    background-color: #ffffff;
}

.chatbot-input-area input:focus {
    outline: none;
    border-color: #333333;
}

.chatbot-input-area button {
    padding: 10px 20px;
    background-color: #000000;
    color: #ffffff;
    border: 2px solid #000000;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 4px;
}

.chatbot-input-area button:hover {
    background-color: #333333;
}

/* Message Popup for Long Messages */
.message-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
}

.message-popup-content {
    background-color: #ffffff;
    border: 2px solid #000000;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.message-popup-header {
    background-color: #000000;
    color: #ffffff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #000000;
}

.message-popup-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-message-popup {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: color 0.2s;
}

.close-message-popup:hover {
    color: #cccccc;
}

.message-popup-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
    font-size: 15px;
    line-height: 1.8;
    color: #000000;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: calc(90vh - 150px);
}

.message-popup-actions {
    padding: 15px 20px;
    border-top: 2px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.chatbot-input-area button:active {
    background-color: #666666;
}

/* Main Content Area - Map */
.main-content {
    flex: 1;
    height: 100%;
    background-color: #ffffff;
    position: relative;
    overflow: hidden;
}

#map-area {
    width: 100%;
    height: 100%;
    border: none;
    position: relative;
    z-index: 1;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 20px;
    color: #666666;
}

.error {
    background-color: #ffeeee;
    border: 2px solid #cc0000;
    color: #cc0000;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 14px;
}

/* Scrollbar Styling */
.chatbot-messages::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.chatbot-messages::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chatbot-messages::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover,
.sidebar::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: 40%;
        border-right: none;
        border-bottom: 2px solid #000000;
        max-width: none;
    }
    
    .main-content {
        height: 60%;
    }
}

/* Popup Modal Styles */
.popup-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.popup-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Flood Zone Control Window (Draggable) */
.flood-zone-control-window {
    position: fixed;
    z-index: 10001;
    width: 200px;
    background-color: #ffffff;
    border: 2px solid #000000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: default;
}

.flood-zone-control-header {
    background-color: #f0f0f0;
    border-bottom: 2px solid #000000;
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    user-select: none;
}

.flood-zone-control-header:hover {
    background-color: #e0e0e0;
}

.flood-zone-control-body {
    padding: 10px;
}

.close-btn-small {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 2px 6px;
    color: #000000;
    font-weight: bold;
    line-height: 1;
}

.close-btn-small:hover {
    background-color: #ff0000;
    color: #ffffff;
}

/* Zone Info Tooltip Styles */
.zone-info-tooltip .leaflet-popup-content-wrapper {
    background-color: #ffffff;
    border: 2px solid #000000;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.zone-info-tooltip .leaflet-popup-content {
    margin: 0;
    padding: 0;
}

.zone-info-tooltip .leaflet-popup-tip {
    background-color: #ffffff;
    border: 2px solid #000000;
}

/* Fix zone overlay transparency - ensure transparent areas don't interfere */
.leaflet-image-layer {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    /* Ensure overlay only covers actual content */
    background: transparent;
}

.leaflet-image-layer img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    /* Ensure transparent pixels are truly transparent */
    mix-blend-mode: normal;
    /* Prevent image from extending past its actual content */
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.popup-content {
    background-color: #ffffff;
    border: 3px solid #000000;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

/* Slide up animation for safety popup on page load */
#safety-popup-modal .popup-content {
    /* Initial state - hidden and translated down */
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

/* Animated state when popup is active */
#safety-popup-modal.active .popup-content {
    opacity: 1;
    transform: translateY(0);
}

.popup-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 20px 10px 20px;
}

.popup-logo {
    max-width: 150px;
    max-height: 150px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.popup-header {
    padding: 20px;
    border-bottom: 2px solid #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Special handling for headers with close buttons */
.popup-header:has(.close-btn) {
    justify-content: space-between;
}

.popup-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #000000;
    margin: 0;
    flex: 1;
    text-align: center;
}

.close-btn {
    background: none;
    border: none;
    font-size: 32px;
    color: #000000;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    line-height: 1;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #666666;
}

.popup-body {
    padding: 30px;
}

.popup-body label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #000000;
    font-size: 16px;
}

.popup-body input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #000000;
    font-size: 16px;
    margin-bottom: 20px;
    background-color: #ffffff;
}

.popup-body input[type="text"]:focus {
    outline: none;
    border-color: #333333;
}

.question-section {
    margin-top: 20px;
}

.question-section p {
    font-size: 18px;
    margin-bottom: 20px;
    color: #000000;
    font-weight: 500;
}

.popup-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.btn-primary,
.btn-secondary {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border: 2px solid #000000;
    transition: all 0.2s;
    min-width: 120px;
    border-radius: 4px;
}

.btn-primary {
    background-color: #000000;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #333333;
}

.btn-secondary {
    background-color: #ffffff;
    color: #000000;
}

.btn-secondary:hover {
    background-color: #f5f5f5;
}

/* Questionnaire Slide Styles */
.questionnaire-body {
    padding: 30px;
}

.question-item {
    margin-bottom: 25px;
    padding: 20px;
    border: 2px solid #000000;
    background-color: #ffffff;
}

.question-item .question-text {
    font-size: 16px;
    font-weight: 500;
    color: #000000;
    margin-bottom: 15px;
}

.question-item .question-number {
    font-weight: 600;
    margin-right: 8px;
}

.question-answers {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.answer-type-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.answer-type-btn {
    flex: 1;
    padding: 8px 16px;
    border: 2px solid #000000;
    background-color: #ffffff;
    color: #000000;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 4px;
}

.answer-type-btn:hover {
    background-color: #f5f5f5;
}

.answer-type-btn.active {
    background-color: #000000;
    color: #ffffff;
}

.yes-no-container {
    display: flex;
    gap: 15px;
}

.text-input-container {
    display: none;
    margin-top: 10px;
}

.text-input-label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
    color: #000000;
}

.answer-text-input {
    width: 100%;
    padding: 10px;
    border: 2px solid #000000;
    font-size: 14px;
    font-family: 'Space Mono', monospace;
    resize: vertical;
    min-height: 80px;
    background-color: #ffffff;
    color: #000000;
    border-radius: 4px;
}

.answer-text-input:focus {
    outline: none;
    border-color: #333333;
}

.answer-btn {
    flex: 1;
    padding: 10px 20px;
    border: 2px solid #000000;
    background-color: #ffffff;
    color: #000000;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 4px;
}

.answer-btn:hover {
    background-color: #f5f5f5;
}

.answer-btn.selected {
    background-color: #000000;
    color: #ffffff;
}

/* Slide Transitions */
.popup-slide {
    transition: opacity 0.3s ease-in-out;
}

.popup-slide.hidden {
    display: none;
}

/* Visibility Menu Styles */
.visibility-menu {
    position: fixed;
    top: 10px;
    right: 20px;
    z-index: 9999;
    font-family: inherit;
}

.menu-toggle-btn {
    padding: 10px 20px;
    background-color: #000000;
    color: #ffffff;
    border: 2px solid #000000;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 4px;
}

.menu-toggle-btn:hover {
    background-color: #333333;
}

.menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background-color: #ffffff;
    border: 2px solid #000000;
    min-width: 250px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.menu-dropdown.active {
    display: block;
}

.menu-item {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.menu-item:last-child {
    border-bottom: none;
}

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.toggle-switch input[type="checkbox"] {
    display: none;
}

.toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: #000000;
    flex: 1;
}

.slider {
    position: relative;
    width: 44px;
    height: 24px;
    background-color: #ccc;
    border-radius: 24px;
    transition: background-color 0.3s;
}

.slider:before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input[type="checkbox"]:checked + .slider {
    background-color: #000000;
}

.toggle-switch input[type="checkbox"]:checked + .slider:before {
    transform: translateX(20px);
}

/* Weather Window Styles */
.weather-window {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 350px;
    max-height: 500px;
    background-color: #ffffff;
    border: 3px solid #000000;
    z-index: 9998;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: none; /* Start hidden */
    flex-direction: column;
}

.weather-header {
    padding: 15px 20px;
    border-bottom: 2px solid #000000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f5f5f5;
}

.weather-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #000000;
    margin: 0;
}

.weather-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #000000;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    line-height: 1;
    transition: color 0.2s;
}

.weather-close-btn:hover {
    color: #666666;
}

.weather-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.weather-loading {
    text-align: center;
    padding: 20px;
    color: #666666;
    font-size: 14px;
}

.weather-current {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #000000;
}

.weather-location {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #000000;
}

.weather-temp {
    font-size: 32px;
    font-weight: 700;
    color: #000000;
    margin: 10px 0;
}

.weather-description {
    font-size: 14px;
    color: #666666;
    margin-bottom: 10px;
}

.weather-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-size: 12px;
    color: #666666;
}

.weather-detail-item {
    display: flex;
    flex-direction: column;
}

.weather-detail-label {
    font-weight: 500;
    margin-bottom: 2px;
}

.weather-forecast {
    margin-top: 20px;
}

.weather-forecast-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #000000;
}

.weather-forecast-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.weather-forecast-item:last-child {
    border-bottom: none;
}

.forecast-date {
    font-size: 13px;
    font-weight: 500;
    color: #000000;
}

.forecast-temp {
    font-size: 14px;
    color: #000000;
}

.forecast-desc {
    font-size: 12px;
    color: #666666;
}

/* News Ticker Styles */
.news-ticker-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background-color: #000000;
    color: #ffffff;
    border-top: 2px solid #000000;
    display: flex;
    align-items: center;
    z-index: 1001; /* Higher than sidebar (998) but lower than popups (9999) */
    overflow: hidden;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.news-ticker-label {
    padding: 0 20px;
    font-weight: 600;
    font-size: 14px;
    color: #000000;
    white-space: nowrap;
    background-color: #ffffff;
    height: 100%;
    display: flex;
    align-items: center;
    border-left: 5px solid #000000;
    border-right: 5px solid #000000;
    border-bottom: 5px solid #000000;
    border-top-left-radius: 15px;
    border-bottom-left-radius: 15px;
}

.news-ticker-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    border-bottom: 5px solid #000000;
}

.news-ticker {
    display: flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    animation: scroll-right-to-left 60s linear infinite;
    padding-left: 20px;
}

.news-ticker.paused {
    animation-play-state: paused;
}

.news-ticker-item {
    display: inline-block;
    padding: 0 30px;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
    border-right: 1px solid #333333;
}

.news-ticker-item:hover {
    color: #ffff00;
}

.news-ticker-item:visited {
    color: #cccccc;
}

.news-loading {
    color: #ffffff;
    font-size: 14px;
    padding: 0 20px;
}

@keyframes scroll-right-to-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Map Marker Popup Styles */
.custom-popup .marker-popup-content {
    padding: 5px;
}

.marker-address {
    margin-bottom: 10px;
    font-size: 14px;
    color: #000000;
    font-weight: 500;
}

.marker-actions {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.add-warning-btn {
    padding: 8px 16px;
    background-color: #000000;
    color: #ffffff;
    border: 2px solid #000000;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 4px;
    width: 100%;
}

.add-warning-btn:hover {
    background-color: #333333;
}

/* Warning Popup Styles */
.warning-popup-content {
    max-width: 500px;
    width: 90%;
}

.warning-types {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 10px;
}

.warning-type-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 2px solid #000000;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
}

.warning-type-option:hover {
    background-color: #f5f5f5;
}

.warning-type-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #000000;
}

.warning-type-option input[type="checkbox"]:checked + span {
    font-weight: 600;
}

.warning-type-option:has(input[type="checkbox"]:checked) {
    background-color: #e0e0e0;
    border-color: #000000;
}

.warning-type-option span {
    flex: 1;
    color: #000000;
}

#warning-other-input {
    padding: 15px;
    border: 2px solid #000000;
    background-color: #f9f9f9;
}

#warning-other-input label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #000000;
}

#warning-other-input input {
    width: 100%;
    padding: 10px;
    border: 2px solid #000000;
    font-size: 14px;
}

#warning-other-input input:focus {
    outline: none;
    border-color: #333333;
}

/* Warning Legend Styles */
.warning-legend {
    position: fixed;
    bottom: 75px;
    right: 20px;
    background-color: #ffffff;
    border: 2px solid #000000;
    border-radius: 6px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-width: 180px;
    font-size: 11px;
}

.legend-header {
    margin-bottom: 8px;
    border-bottom: 1px solid #000000;
    padding-bottom: 6px;
}

.legend-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #000000;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: default;
}

.legend-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.legend-label {
    color: #000000;
    font-weight: 500;
    font-size: 10px;
}


/* Warning marker icon styles */
.warning-marker-icon {
    background: transparent;
    border: none;
}

/* Hotel Search Styles */
/* Hotel Search Button */
.btn-hotel-search {
    width: 100%;
    padding: 12px;
    background-color: #000000;
    color: #ffffff;
    border: 2px solid #000000;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 20px;
    border-radius: 4px;
}

.btn-hotel-search:hover {
    background-color: #333333;
}

/* Hotel Search Modal */
.hotel-search-content {
    max-width: 900px;
    width: 95%;
    max-height: 95vh;
}

.hotel-search-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
}

.hotel-filters {
    border: 2px solid #000000;
    padding: 20px;
    background-color: #f9f9f9;
}

.hotel-filters h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: #000000;
    border-bottom: 2px solid #000000;
    padding-bottom: 8px;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.filter-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #000000;
    font-size: 14px;
    background-color: #ffffff;
    cursor: pointer;
}

.filter-group select:focus {
    outline: none;
    border-color: #333333;
}

.filter-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-checkboxes label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.filter-checkboxes label:hover {
    background-color: #f5f5f5;
}

.filter-checkboxes input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #000000;
}

.filter-checkboxes span {
    font-weight: normal;
    font-size: 14px;
}

.hotel-filters .popup-buttons {
    margin-top: 15px;
    justify-content: flex-start;
}

.hotel-filters button {
    padding: 10px 20px;
    font-size: 14px;
    min-width: auto;
}

/* AI Section */
.hotel-ai-section {
    border: 2px solid #000000;
    padding: 20px;
    background-color: #ffffff;
}

.hotel-ai-section h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: #000000;
    border-bottom: 2px solid #000000;
    padding-bottom: 8px;
}

.hotel-ai-messages {
    max-height: 200px;
    overflow-y: auto;
    border: 2px solid #e0e0e0;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #f9f9f9;
}

.hotel-ai-messages .ai-message {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
}

.hotel-ai-messages .ai-message.user-message {
    background-color: #e8f4f8;
    border-left: 3px solid #000000;
    margin-left: 20px;
}

.hotel-ai-messages .ai-message.bot-message {
    background-color: #f5f5f5;
    border-left: 3px solid #666666;
    white-space: pre-line;
}

.hotel-ai-messages .ai-message.bot-message ul {
    margin: 10px 0;
    padding-left: 20px;
    list-style: none;
}

.hotel-ai-messages .ai-message.bot-message li,
.hotel-ai-messages .ai-message.bot-message {
    line-height: 1.6;
}

.hotel-ai-messages .ai-message.loading {
    color: #666666;
    font-style: italic;
}

.hotel-ai-messages .ai-message.error {
    background-color: #ffeeee;
    border-left-color: #cc0000;
    color: #cc0000;
}

.hotel-ai-messages ul {
    margin: 10px 0;
    padding-left: 20px;
}

.hotel-ai-messages li {
    margin-bottom: 5px;
}

.hotel-ai-input {
    display: flex;
    gap: 10px;
}

.hotel-ai-input input {
    flex: 1;
    padding: 10px;
    border: 2px solid #000000;
    font-size: 14px;
    background-color: #ffffff;
}

.hotel-ai-input input:focus {
    outline: none;
    border-color: #333333;
}

.hotel-ai-input button {
    padding: 10px 20px;
    background-color: #000000;
    color: #ffffff;
    border: 2px solid #000000;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 4px;
}

.hotel-ai-input button:hover {
    background-color: #333333;
}

/* Hotel Results Section */
.hotel-results-section {
    border: 2px solid #000000;
    padding: 20px;
    background-color: #ffffff;
    max-height: 400px;
    overflow-y: auto;
}

.hotel-results-section h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: #000000;
    border-bottom: 2px solid #000000;
    padding-bottom: 8px;
}

.hotel-results-summary {
    margin-bottom: 15px;
    padding: 15px;
    background-color: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
}

.hotel-results-summary p {
    margin: 5px 0;
    font-size: 14px;
}

.hotel-results-summary .active-filters {
    color: #0066cc;
    font-weight: 500;
    font-size: 13px;
}

.hotel-results-summary .sort-info {
    color: #666666;
    font-size: 12px;
    font-style: italic;
}

.hotel-results-section .loading-text, 
.hotel-results-section .error-text {
    padding: 20px;
    text-align: center;
    color: #666666;
    font-size: 14px;
}

.hotel-results-section .error-text {
    color: #cc0000;
    background-color: #ffeeee;
    border: 1px solid #cc0000;
    border-radius: 4px;
}

.progress-container {
    padding: 20px;
    background-color: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
}

.progress-bar {
    height: 20px;
    background-color: #000000;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: width 0.3s ease;
}

.progress-container .loading-text {
    padding: 10px 0;
    margin: 0;
    font-weight: 500;
    font-size: 14px;
}

.progress-container .status-percentage {
    padding: 5px 0;
    margin: 0;
    font-size: 12px;
    color: #666666;
    font-weight: 600;
}

.initial-message {
    padding: 30px;
    text-align: center;
    background-color: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
}

.initial-message p {
    margin: 10px 0;
    font-size: 15px;
    color: #333333;
}

.initial-message .hint-text {
    font-size: 13px;
    color: #666666;
    font-style: italic;
}

.hotel-results-summary .showing-info {
    color: #0066cc;
    font-weight: 500;
    font-size: 13px;
    margin: 5px 0;
}

.expand-search-prompt {
    margin-top: 30px;
    padding: 20px;
    background-color: #f0f8ff;
    border: 2px solid #0066cc;
    border-radius: 4px;
    text-align: center;
}

.expand-search-prompt p {
    margin: 10px 0;
    font-size: 15px;
    color: #333333;
    font-weight: 500;
}

.expand-search-prompt .hint-text {
    font-size: 13px;
    color: #666666;
    margin: 10px 0;
}

.expand-search-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.expand-btn {
    padding: 12px 25px;
    font-size: 14px;
    min-width: 180px;
    cursor: pointer;
}

.hotel-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hotel-card {
    border: 2px solid #000000;
    padding: 15px;
    background-color: #ffffff;
    transition: box-shadow 0.2s;
}

.hotel-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hotel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.hotel-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    flex: 1;
}

.hotel-rating {
    font-size: 14px;
    color: #666666;
    white-space: nowrap;
}

.hotel-info {
    margin-bottom: 10px;
}

.hotel-info p {
    margin: 5px 0;
    font-size: 14px;
    color: #333333;
}

.hotel-location, .hotel-distance, .hotel-price {
    font-weight: 500;
}

.hotel-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.feature-badge {
    display: inline-block;
    padding: 4px 10px;
    background-color: #f0f0f0;
    border: 1px solid #000000;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.feature-badge.pet-friendly {
    background-color: #e8f5e9;
    border-color: #4caf50;
}

.feature-badge.has-food {
    background-color: #fff3e0;
    border-color: #ff9800;
}

.feature-badge.vacancy {
    background-color: #e3f2fd;
    border-color: #2196f3;
}

.hotel-note {
    font-size: 12px;
    color: #666666;
    font-style: italic;
    margin-top: 8px;
    padding: 8px;
    background-color: #fff9e6;
    border-left: 3px solid #ffc107;
}

.hotel-source {
    font-size: 11px;
    color: #999999;
    margin-top: 8px;
    font-style: italic;
}

.hotel-links {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.hotel-link-btn {
    flex: 1;
    padding: 10px 15px;
    text-align: center;
    text-decoration: none;
    border: 2px solid #000000;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-block;
}

.hotel-link-btn.primary-link {
    background-color: #000000;
    color: #ffffff;
}

.hotel-link-btn.primary-link:hover {
    background-color: #333333;
    border-color: #333333;
}

.hotel-link-btn.secondary-link {
    background-color: #ffffff;
    color: #000000;
}

.hotel-link-btn.secondary-link:hover {
    background-color: #f5f5f5;
}

.hotel-rating-info {
    font-size: 14px;
    color: #666666;
    margin: 5px 0;
}

/* Scrollbar for hotel results */
.hotel-results-section::-webkit-scrollbar,
.hotel-ai-messages::-webkit-scrollbar {
    width: 8px;
}

.hotel-results-section::-webkit-scrollbar-track,
.hotel-ai-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.hotel-results-section::-webkit-scrollbar-thumb,
.hotel-ai-messages::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.hotel-results-section::-webkit-scrollbar-thumb:hover,
.hotel-ai-messages::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Zone Selector Dropdown */
.zone-selector-dropdown {
    position: relative;
    width: 100%;
    margin-top: 10px;
    z-index: 1001;
}

.zone-selector-toggle {
    width: 100%;
    padding: 8px 12px;
    background-color: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.zone-selector-toggle:hover {
    background-color: #f5f5f5;
    border-color: #999999;
}

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.2s;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.zone-selector-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    pointer-events: auto;
}

.zone-selector-dropdown-content.active {
    display: block;
}

.zone-checkbox-item {
    padding: 8px 12px;
    border-bottom: 1px solid #eeeeee;
    pointer-events: auto;
}

.zone-checkbox-item:last-child {
    border-bottom: none;
}

.zone-checkbox-item:hover {
    background-color: #f9f9f9;
}

.zone-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    width: 100%;
    font-size: 13px;
    pointer-events: auto;
    user-select: none;
}

.zone-checkbox {
    margin-right: 10px;
    cursor: pointer;
    width: 16px;
    height: 16px;
    pointer-events: auto;
    flex-shrink: 0;
}

.zone-checkbox-text {
    display: flex;
    align-items: center;
    flex: 1;
    pointer-events: none;
}

.zone-color-indicator {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    margin-right: 8px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    display: inline-block;
}

/* Markdown Styles in Chatbot Messages */
.message-content h1,
.message-content h2,
.message-content h3,
.message-content h4,
.message-content h5,
.message-content h6 {
    margin: 12px 0 8px 0;
    font-weight: 600;
    color: #000000;
    line-height: 1.4;
}

.message-content h1 { font-size: 20px; }
.message-content h2 { font-size: 18px; }
.message-content h3 { font-size: 16px; }
.message-content h4 { font-size: 15px; }
.message-content h5 { font-size: 14px; }
.message-content h6 { font-size: 13px; }

.message-content p {
    margin: 8px 0;
    line-height: 1.6;
}

.message-content ul,
.message-content ol {
    margin: 8px 0;
    padding-left: 24px;
}

.message-content li {
    margin: 4px 0;
    line-height: 1.5;
}

.message-content code {
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    padding: 2px 6px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #d63384;
}

.message-content pre {
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 12px;
    overflow-x: auto;
    margin: 12px 0;
}

.message-content pre code {
    background-color: transparent;
    border: none;
    padding: 0;
    color: #000000;
    font-size: 12px;
}

.message-content blockquote {
    border-left: 3px solid #000000;
    padding-left: 12px;
    margin: 12px 0;
    color: #666666;
    font-style: italic;
}

.message-content a {
    color: #0066cc;
    text-decoration: underline;
}

.message-content a:hover {
    color: #004499;
}

.message-content strong,
.message-content b {
    font-weight: 600;
    color: #000000;
}

.message-content em,
.message-content i {
    font-style: italic;
}

.message-content hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 16px 0;
}

.message-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 12px 0;
}

.message-content table th,
.message-content table td {
    border: 1px solid #e0e0e0;
    padding: 8px 12px;
    text-align: left;
}

.message-content table th {
    background-color: #f5f5f5;
    font-weight: 600;
}

/* PDF Viewer Styles */
.pdf-viewer-content {
    background-color: #ffffff;
    border: 3px solid #000000;
    width: 90%;
    max-width: 1200px;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.pdf-viewer-header {
    padding: 20px;
    border-bottom: 2px solid #000000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #000000;
    color: #ffffff;
}

.pdf-viewer-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.pdf-viewer-header .close-btn {
    color: #ffffff;
}

.pdf-viewer-header .close-btn:hover {
    color: #cccccc;
}

.pdf-viewer-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.pdf-viewer-controls {
    padding: 15px 20px;
    border-bottom: 2px solid #000000;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    background-color: #f5f5f5;
}

.pdf-viewer-controls #pdf-page-info {
    margin: 0 10px;
    font-weight: 500;
    color: #000000;
    font-size: 14px;
}

.pdf-viewer-controls button {
    padding: 8px 16px;
    font-size: 13px;
    min-width: 80px;
}

.pdf-viewer-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pdf-viewer-canvas-container {
    flex: 1;
    overflow: auto;
    background-color: #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
}

#pdf-canvas {
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* View PDF Button */
.view-pdf-btn {
    padding: 8px 16px;
    background-color: #000000;
    color: #ffffff;
    border: 2px solid #000000;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 4px;
}

.view-pdf-btn:hover {
    background-color: #333333;
}

.view-pdf-btn:disabled {
    background-color: #666666;
    cursor: not-allowed;
    opacity: 0.6;
}

