/* General Styles */
body, html {
    margin: 0 auto; /* Center horizontally */
    overflow-x: hidden; /* Disable horizontal scrolling */
}

.page-container {
    min-height: 100%; /* Ensure children fill the page */
    max-width: 1440px;
    margin: 0 auto;
    width: 100%; /* Compatible with smaller screens */
}

.plot-container {
    transition: opacity 0.3s ease;
    display: flex;           /* Enable flexbox layout */
    justify-content: center; /* Center horizontally */
    align-items: center;     /* Center vertically */
    margin: 0 auto;          /* Center-align, suitable for single-column layout */
    margin-top: 30px;
    text-align: center;
}

/* Navbar Styles */
.navbar {
    padding: 1rem;
    background-color: #343a40 !important;
}

.navbar-brand img {
    height: 60px;
    width: 60px;
    margin-right: 10px;
    margin-top: -8px;
    margin-bottom: -8px;
}

.nav-link {
    color: rgba(255,255,255,.75) !important;
    margin-right: 15px;
}

.nav-link:hover {
    color: rgba(255,255,255,1) !important;
}

.navbar-brand {
    color: #fff !important;
    font-size: 1.5rem;
    font-weight: 500;
}

/* Dropdown Menu Styles */
.dropdown-menu {
    background-color: #343a40;
    border: none;
    margin-top: 0;
}

.dropdown-item {
    color: rgba(255,255,255,.75) !important;
    padding: 0.5rem 1.5rem;
}

.dropdown-item:hover {
    color: #fff !important;
    background-color: #2c3136;
}

/* Nested Dropdown Styles */
.navbar .dropdown-menu .dropdown-menu {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    margin-top: -0.1rem;
}

.navbar .dropdown-menu .dropdown-item:hover + .dropdown-menu,
.navbar .dropdown-menu .dropdown-menu:hover {
    display: block;
}

.navbar .dropdown-menu .dropdown-menu {
    z-index: 1050;
}

/* Form Styles */
.form-container {
    position: sticky;
    top: 0;
    background: white !important;
    z-index: 100;
    padding: 1rem 0;
}

/* Uniform Select Box Styles */
.form-select, .bootstrap-select .dropdown-toggle {
    height: 38px !important;
    line-height: 38px !important;
    padding: 0 12px !important;
}

.bootstrap-select {
    width: 200px !important;
}

#data-type, #ownership-type {
    width: 200px;
}

/* Simplified Dropdown Styles */
.bootstrap-select > .dropdown-toggle {
    background-color: white !important;
    border: 1px solid #ced4da !important;
    padding: 0 12px !important;
}

/* Remove Internal Extra Borders */
.bootstrap-select > .dropdown-toggle.bs-placeholder {
    border: none !important;
}

/* Form Group Styles */
.form-group {
    flex: 1 1 200px;
    display: none;
    flex-direction: column;
}

/* Date Input Styles */
.date-input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

/* Submit Button Styles */
button.btn {
    align-self: flex-end;
    padding: 0.375rem 0.75rem; /* Match input box padding */
    border-radius: 0.25rem; /* Rounded corners, consistent with input */
    cursor: pointer;
    font-size: 1rem; /* Font size matches input */
    height: 38px; /* Ensure consistent height */
    width: 50px; /* Button adjusts to content width */
    box-sizing: border-box; /* Includes padding and border in width */
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Button Hover Effect */
button.btn:hover {
    background-color: #f8f9fa; /* Light gray background */
    color: #000000; /* Keep text black */
}

/* Uniform Style: Ensure Buttons and Select Boxes Match */
select.form-select, input.form-control, button.btn {
    display: inline-block;
    height: 38px; /* Unified height */
    line-height: 1.5;
}

/* Data Info Section Styles */
.data-info-section {
    padding: 15px 30px;
    background-color: #ffffff;
    border-top: 1px solid #ddd;
    font-size: 16px;
    line-height: 1.6;
}

.bootstrap-select > .dropdown-toggle.bs-placeholder {
    border: none !important;
}

/* Chart Container Styles */
.plotly-graph-div {
    font-family: "Arial", sans-serif; /* Font */
    color: #333; /* Default text color */
    background-color: transparent; /* Transparent background */
    border: none; /* Remove border */
    border-radius: 0; /* Remove rounded corners */
    padding: 0; /* Remove padding */
}

/* Chart Title Styles */
.plotly-graph-div .title {
    font-size: 20px; /* Title font size */
    font-weight: bold; /* Bold title */
    text-align: center; /* Center-align title */
}

/* Legend Styles */
.plotly-legend {
    font-size: 14px;
}

.bootstrap-select {
    width: 200px !important; /* Enforce width */
}

.bootstrap-select .dropdown-toggle {
    display: flex !important; /* Ensure content is centered */
    align-items: center !important;
    justify-content: space-between !important;
}
