.CodeMirror {
    border: 1px solid black;
    font-size: 13px;
    height: auto;
    min-height: 200px;
}

.CodeMirror-scroll {
    overflow-y: hidden !important;
    overflow-x: auto !important;
}

.CodeMirror-scrollbar-filler {
    display: none !important;
}

footer{
    min-height: 50px;
    background-color: #f0f0f0;
    color: #002147;
    padding: 8px 0;
    text-align: center;
}

footer a {
    color: #2A6496;
}

footer a:hover {
    color: #1e4d73;
}

footer p{
    display: block;
    margin-block-start: 1em;
    margin-block-end: 1em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
}

#result{
  margin-bottom: 60px;
}

.row{
  margin-bottom: 20px;
}

.sparql-example{
  cursor: pointer;
}

#xsltcontainer{
  display: none;
}

#examplesMainBody {
  max-height: 450px;
  overflow: scroll;
}

.pre-scrollable {
    max-height: 550px;
    overflow-y: scroll;
}

#permalink-url{
  font-size: 24px;
  text-align: center;
}

#fullscreen-navbar {
  display: none;
  background-color: #f5f5f5;
}

#fullscreen-navbar .container {
  text-align: center;
}

#fullscreen-navbar .row {
  margin-bottom: 0px;
}

#fullscreen-navbar input {
  margin-top:5px;
  margin-bottom: 5px;
}

.CodeMirror-fullscreen {
  top: 44px;
}

.btn-dark {
    background-color: #343A40;
    border-color: #2b3035;
    color: #fff;
}
.btn-dark:hover, .btn-dark:focus, .btn-dark:active {
    background-color: #2b3035;
    border-color: #22262a;
    color: #fff;
}

.container-fluid{
    max-width: 1600px;
}

.buttons-holder .btn{
    margin: 3px;
}

.query-spinner {
    text-align: center;
    padding: 40px;
}

.query-spinner .spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #ddd;
    border-top: 3px solid #2A6496;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.query-spinner p {
    margin-top: 10px;
    color: #777;
}

/* Examples treeview node hover transition */
.list-group-item {
    transition: background-color 0.15s ease-in-out;
}

/* Friendly SPARQL error display */
.error-hint {
    font-size: 13px;
    margin-top: 8px;
    color: #555;
}

.error-details-toggle {
    cursor: pointer;
    text-decoration: underline;
    color: #31708f;
    font-size: 13px;
}

.error-details-toggle:hover {
    color: #245269;
}

.error-raw {
    display: none;
    margin-top: 10px;
    font-family: monospace;
    font-size: 12px;
    max-height: 300px;
    overflow-y: auto;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 10px;
}


/* Description panel */
#description-panel {
    transition: opacity 0.3s ease;
    margin-bottom: 8px;
}

#description-panel.panel-stale {
    opacity: 0.5;
}

#description-panel .panel-body {
    overflow: visible;
}

#description-panel .stale-indicator {
    font-size: 12px;
    color: #999;
    font-style: italic;
    margin-top: 4px;
}

/* Param row layout inside description panel */
#desc-params .param-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#desc-params .param-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

#desc-params .param-item label {
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    margin-bottom: 0;
}

#desc-params .param-item .form-control {
    width: auto;
    min-width: 140px;
    font-size: 13px;
}

#desc-params .autocomplete-wrapper {
    position: relative;
    display: inline-block;
    min-width: 200px;
}

#desc-params .autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

#desc-params .autocomplete-option {
    padding: 6px 10px;
    cursor: pointer;
    font-size: 13px;
}

#desc-params .autocomplete-option:hover,
#desc-params .autocomplete-option.active {
    background-color: #337ab7;
    color: #fff;
}

/* Autocomplete dropdown (generic) */
.autocomplete-wrapper {
    position: relative;
    display: inline-block;
}

.autocomplete-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    width: 360px;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.autocomplete-option {
    padding: 4px 8px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-option:hover,
.autocomplete-option.highlighted {
    background-color: #f0f0f0;
}

.autocomplete-option-id {
    font-weight: 700;
    color: #337ab7;
}

.autocomplete-option-title {
    color: #555;
}

.autocomplete-option-species {
    color: #888;
    font-size: 11px;
}

.autocomplete-option-more {
    padding: 4px 8px;
    font-size: 12px;
    color: #999;
    font-style: italic;
}

/* Examples panel error/warning messages */
#examples .alert-warning,
#examples-fs .alert-warning {
    font-size: 13px;
}

/* Endpoint health indicator dot */
.endpoint-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    vertical-align: middle;
    cursor: default;
}

.dot-checking {
    background-color: #2A6496;
    animation: pulse-dot 1.2s ease-in-out infinite;
}

.dot-green {
    background-color: #5cb85c;
}

.dot-amber {
    background-color: #f0ad4e;
}

.dot-red {
    background-color: #d9534f;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* UM Brand: Navbar */
.navbar-default {
    background-color: #002147;
    border-color: #001a38;
    margin-bottom: 0;
}

.navbar-default > .container-fluid {
    display: flex;
    align-items: center;
}

.navbar-default .navbar-header {
    float: none;
}

.navbar-default .navbar-brand {
    height: auto;
    padding: 0 15px;
}

.navbar-default .navbar-collapse {
    float: none;
    flex: 1;
    display: flex !important;
    justify-content: flex-end;
    align-items: center;
}

.navbar-default .navbar-brand:hover,
.navbar-default .navbar-brand:focus {
    background-color: transparent;
}

.navbar-default .navbar-nav > li > a {
    color: #fff;
}

.navbar-default .input-group-addon {
    background-color: rgba(255,255,255,0.1);
    color: #fff;
    border-color: rgba(255,255,255,0.2);
}

.navbar-default .form-control {
    border-color: rgba(255,255,255,0.2);
}

.navbar-form.navbar-right {
    padding-right: 0;
    margin-right: 0;
    margin-top: 0;
    margin-bottom: 0;
}

/* UM Brand: Button color overrides */

/* Query = UM blue */
.btn-success {
    background-color: #2A6496;
    border-color: #245580;
    color: #fff;
}
.btn-success:hover, .btn-success:focus, .btn-success:active {
    background-color: #235a87;
    border-color: #1e4d73;
    color: #fff;
}

/* Reset = UM orange */
.btn-danger {
    background-color: #E87722;
    border-color: #d46b1e;
    color: #fff;
}
.btn-danger:hover, .btn-danger:focus, .btn-danger:active {
    background-color: #d46b1e;
    border-color: #c0601a;
    color: #fff;
}

/* Export CSV = Light blue */
.btn-warning {
    background-color: #5B9BD5;
    border-color: #4a8bc5;
    color: #fff;
}
.btn-warning:hover, .btn-warning:focus, .btn-warning:active {
    background-color: #4a8bc5;
    border-color: #3a7bb5;
    color: #fff;
}

/* Export JSON = Steel blue */
.btn-primary {
    background-color: #4472C4;
    border-color: #3a65b3;
    color: #fff;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: #3a65b3;
    border-color: #3058a2;
    color: #fff;
}

/* Export XML = Teal blue */
.btn-info {
    background-color: #2E75B6;
    border-color: #2868a4;
    color: #fff;
}
.btn-info:hover, .btn-info:focus, .btn-info:active {
    background-color: #2868a4;
    border-color: #225b92;
    color: #fff;
}

/* Get Permalink = Gray */
.btn-secondary {
    background-color: #6C757D;
    border-color: #60686f;
    color: #fff;
}
.btn-secondary:hover, .btn-secondary:focus, .btn-secondary:active {
    background-color: #60686f;
    border-color: #545b62;
    color: #fff;
}

/* Show Prefixes = Off-white */
.btn-light {
    background-color: #f8f9fa;
    border-color: #ddd;
    color: #333;
}
.btn-light:hover, .btn-light:focus, .btn-light:active {
    background-color: #e9ecef;
    border-color: #ccc;
    color: #333;
}
