/* Style of the captured pictures */
.image-container, .generic-container {
    text-align: center;
    max-width: 800px;
    width: 100%;
    overflow:hidden;
    margin: 0 auto;
}

.align-left {
    text-align: left;
}

.image-container img {
    border-radius: .5rem;
    width: 100%;
    max-width: 800px;
    height: auto;
    object-fit: cover;
    object-position: center;
    margin-top: .25rem;
    margin-bottom: .25rem;
    outline: 4px solid rgba(250, 250, 250);
    outline-offset: -2px;
}

.generic-container table {
    width: 100% !important;
    margin: 0 auto;
}

.generic-container table th, 
.generic-container table td {
    text-align: center;
    background-color: transparent !important;
    vertical-align: middle;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.generic-container table td:first-child {
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
}

.generic-container table tr:not(:last-child) td {
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}

.image-container-alert {
    background-color: rgb(255 251 223) !important;
}

.image-container-alert img {
    outline: 4px solid rgb(255 251 223) !important;
}

.html-fill-container {
    padding-left: 0.2rem !important;
    padding-right: 0.2rem !important;
}

.no-images-found {
    text-align: center;
    width: 100%;
    margin: 0 auto;
}

.card {
    background-color: rgba(250, 250, 250, .9);
    border: 1px solid rgba(233, 236, 239, .9);
    border-radius: .5rem;
    box-shadow: 0px 1px 2px rgba(0, 0, 0, .1), 0px 3px 7px rgba(0, 0, 0, .1), 0px 12px 30px rgba(0, 0, 0, .08);
    margin-top: 2rem;
    padding: .25rem;
}

.card-body {
    padding: 0px;
    overflow: hidden !important;
}

#ui_photos_range_selector {
    margin-left: auto;
    margin-right: auto;
    width: "600px";
}

#date_selector {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: auto;
    margin: 0 auto;
}

#date_selector .form-control { 
    text-align: center;
}

.btn-date-control {
    height: 36.7px;
    padding: 7px;
    width: 36.7px;
    vertical-align:middle;
    margin-top: 10px;
    margin-bottom: 10px;
}

.btn-date-filter {
    height: 36.7px;
    width: auto;
    padding: 7px;
    vertical-align:middle;
}

.btn-config {
    padding: 7px;
    vertical-align:middle;
}

.btn-no-border {
    border-color: transparent;
    padding: 0.1rem;
}

.table_nobgcolor {
    --bs-table-bg: transparent !important;
}

.table_horscrollbar {
    overflow-x: auto;
    width: 100%;
}

.placeholder-image {
    display: grid;
    place-items: center;
    height: 100%;
    width: 100%;
    min-height: 250px;
    background-color: #f8f9fa;
    color: #6c757d;
    border: 2px dashed #dee2e6;
    border-radius: 4px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0, 0, 0, 0.1);
    border-left-color: #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 150px;
}

.disabled-wrapper {
    pointer-events: none;
    opacity: 0.5;
}

.btn-narrow {
    padding: 0.5em 1em;
}

.btn-vertical-margin {
    margin-top: 0.15em;
    margin-bottom: 0.15em;
}

.btn-danger-custom {
    background-color: #dc3545;
    color: white;
    border: none;
    /*padding: 10px 16px;
    font-size: 16px;
    border-radius: 5px;*/
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}

.btn-danger-custom:hover {
    background-color: #c82333;
}

.btn-danger-custom:active {
    background-color: #a71d2a;
    transform: scale(0.98);
}

.btn-danger-custom:disabled {
    background-color: #e0a0a5;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Override bootstrap configuration for modal */
@media screen and (min-width: 576px) {
    .modal {
        --bs-modal-margin: 2rem; /* Fix incorrect vertical position on wider screens */
    }
}

.modal-content:has(.transparent-modal-content) {
    background: rgb(0 0 0 / 0%) !important;
    border: 0 !important;
  }

  .transparent-modal-content {
    padding: 0 !important;
  }
  .transparent-modal-content + div {
    padding: 0 !important;
  }
 

/* Live view panel - Event table */
.date-separator-row td {
  font-weight: bold;
  text-align: center;
  border-bottom: 1px solid #dee2e6;
  border-top: 1px solid #dee2e6;
  padding: 20px 0 5px 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(230, 230, 230, 0.25) 100%);
}

.event-date-separator {
  font-weight: bold;
  text-align: center;
}

.tooltip-wrapper {
  cursor: default;
}

  #shiny-disconnected-overlay {
    opacity: 0.75;
  }

  #shiny-disconnected-overlay::after {
    content: "Connection lost.\A Trying to reconnect...";
    font-size: 1.5rem;
    font-weight: bold;
    color: rgb(255 237 115);
    text-shadow: 2px 2px 4px black;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #252525;
    padding: 20px 40px;
    border-radius: 10px;
    z-index: 99999;
    text-align: center;
    max-width: 80%;
    white-space: pre-wrap;
  }

.card:has(#bResetPreyCooldown:disabled) {
    display: none;
}

.table_models_overview {
    table-layout: auto;
    width: 100%;
}

.table_models_overview td {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}

.table_models_overview th:first-child,
.table_models_overview td:first-child {
    /* Name column */
    max-width: 70%;
    width: 70%;
}

.table_models_overview th:nth-child(2),
.table_models_overview td:nth-child(2) {
    /* Date column */
    min-width: 110px;
}

.table_models_overview th:last-child,
.table_models_overview td:last-child {
    /* Action button column */
    width: 55px;
    min-width: 55px;
    max-width: 55px;
    text-align: center;
}

.release_notes {
    background-color: #f8f9fa;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.8em !important;
    text-align: left !important;
}

.release_notes h1 {
    font-size: 1.3em;
}
.release_notes h2 {
    font-size: 1.1em;
}
.release_notes h3 {
    font-size: 1em;
}
.release_notes h4 {
    font-size: 0.95em;
}
.release_notes h5 {
    font-size: 0.9em;
}
.release_notes h6 {
    font-size: 0.85em;
}

.collapsible-header-btn {
    width: 100%;
    text-align: left;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 0.75em 1.2em;
    font-size: larger;
    font-weight: 400;
    color: #212529;
    display: flex;
    align-items: center;
    transition: background 0.2s;
    border-radius: 0.5rem 0.5rem 0 0;
    border-bottom: none;
    margin-bottom: 0;
}
.collapsible-header-btn:hover, .collapsible-header-btn:focus {
    background: #e9ecef;
    text-decoration: none;
    color: #212529;
}
.collapsible-chevron {
    margin-right: 0.7em;
    transition: transform 0.3s;
    font-size: 1.2em;
}
.collapsible-header-btn[aria-expanded="true"] .collapsible-chevron {
    transform: rotate(90deg);
}
.collapsible-section-intro {
    color: #666;
    margin-bottom: 0.5em;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    text-align: left;
    padding-bottom: 1em;
}

.collapsible-section {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    display: block;
    border-radius: 0.5rem;
    box-shadow: 0px 1px 2px rgba(0,0,0,.1), 0px 3px 7px rgba(0,0,0,.1), 0px 12px 30px rgba(0,0,0,.08);
    background: rgba(250,250,250,0.9);
    border: 1px solid #e9ecef;
    padding: 0;
    overflow: hidden;
}

.collapsible-section > .collapse,
.collapsible-section > .collapse.show,
.collapsible-section > div[id$="_body"] {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    display: block;
    border-radius: 0 0 0.5rem 0.5rem;
    border-top: 1px solid #e9ecef;
    background: transparent;
    /* Remove top margin to connect with header */
    margin-top: 0;
    padding-bottom: 1em;
}

/* Remove double border between header and expanded part */
.collapsible-section > .collapse,
.collapsible-section > .collapse.show {
    border-top: none;
}

/* Optional: Remove background from .collapsible-section-intro if you want it to blend in */
.collapsible-section-intro {
    background: transparent;
    border: none;
    padding-left: 1em;
    padding-right: 1em;
}

.warning-container {
    background: #fcfcf4;
    border: 1px solid #ffe58f;
    color: #8a6d3b;
    border-radius: 8px;
    padding: 6px 12px;
    margin-top: 8px;
    font-size: 0.8em;
    display: inline-block;
    box-shadow: 0 1px 4px rgba(0,0,0,0.01);
}

/* Modern style for dropdown selectors */
.form-select,
.shiny-input-select,
select {
    background: #f8f9fa;
    border: 1.5px solid #ced4da;
    border-radius: 8px;
    padding: 0.5em 2.5em 0.5em 1em;
    font-size: 1rem;
    color: #212529;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    outline: none;
    cursor: pointer;
    min-width: 120px;
    padding-right: 3em;
    min-height: 2.7em;
    box-sizing: border-box;
}

.form-select:focus,
.shiny-input-select:focus,
select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.15);
}

.form-select:hover,
.shiny-input-select:hover,
select:hover {
    border-color: #007bff;
}

/* Custom dropdown arrow */
.form-select,
.shiny-input-select,
select {
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' fill='gray' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6l4 4 4-4' stroke='gray' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1em center;
    background-size: 1em;
}

/* Remove default arrow for Chrome */
select::-ms-expand {
    display: none;
}