.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{
    height: 50px;
    background-color: #f5f5f5;
}

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

#result{
  margin-bottom: 50px;
}

.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 {
    color: #fff;
    background-color: #555;
    border-color: #555;
}

.btn-dark:hover {
    color: #fff;
    background-color: #aaa;
    border-color: #666;
}

.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 #5cb85c;
    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: #999;
    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; }
}
