html {
    /* mozilla */
    /* scrollbar-color: rebeccapurple green; */
    scrollbar-width: thin;

    /* chrome */
    /* -webkit-scrollbar-color: rebeccapurple green; */
    -webkit-scrollbar-width: thin;
}

div {
    /* mozilla */
    /* scrollbar-color: rebeccapurple green; */
    scrollbar-width: thin;

    /* chrome */
    /* -webkit-scrollbar-color: rebeccapurple green; */
    -webkit-scrollbar-width: thin;    
}
#submit_record__row .btn {
    margin-bottom: 0;
}
.search::before {
	font-family: 'FontAwesome';
	font-weight: 400;
	content: "\F002";
}

#diagram > svg {
	display: block;
	margin: 0 auto;
}

body > div.w2p_flash.alert.alert-dismissable{
    top: 12%;
    right: 3%;
    padding: 0.25rem 0.35rem 0.25rem 0.25rem;
}

h1, .h1 {
    font-size: 2rem;
}
h2, .h2 {
    font-size: 1.8rem;
} 
h3, .h3{
    font-size: 1.6rem;
}
h4, .h4{
    font-size: 1.4rem;
}
h5, .h5{
    font-size: 1.2rem;
}
h6, .h6{
    font-size: 1.1rem;
}

g .label{
	font-weight: bolder;
	font-family: "Verdana", sans-serif;
	color: rgb(0,0,0);
}

.table-borderless tbody tr td, .table-borderless tbody tr th, .table-borderless thead tr th {
    border: none;
}

/*.modal-header, .close {
	background-color: #6DA802;
	color: white !important;
	text-align: left;
	font-size: 30px;
}*/

.help-block pre {
    white-space: pre-wrap;
    margin: 1em 0;
    word-break: normal;
    background-color: #f5f5f5;
    border: 1px solid #cccccc;
}

/*for debuggging*/
#web2py {
    position: inherit;
    top: 5px;
    left: 5px;
    height: 250px;
    width: 50%;
    background-color: #111111;
    color: white;
    overflow: auto;
    font-size: 12px;
}


#web2py h1 {
    margin: 0;
    padding: 0;
    font-size: 16px;
}

#web2py h2 {
	font-size: 14px;
}

#web2py #w2p_environ {
    position: absolute;
    top: 50px;
    left: 5px;
    height: 250px;
    width: 100%;
    background-color: #111111;
    color: white;
}

#web2py .data {
    display: none;
    overflow: auto;
    position: relative;
    height: 600px;
    width: 100%;
}

td.w2p_fl, td.w2p_fw{
    padding-top: 5px;
}

table {
    vertical-align: top;
}

.table {
    color: unset !important;
}

.scroll-box {
    max-height: calc(100vh - 210px);
    overflow-y: auto;
}



.input-group-append > .fa-plus-circle,
.input-group-append > .fa-minus-circle{
    align-self: center;
}

.help-block {
    font-style: italic;
    font-weight: lighter;
}

.badge-primary-light {
    color: #004085;
    background-color: #cce5ff;
    border-color: #b8daff;
}

input[type="checkbox"], input[type="radio"] {
    margin-right: 8px;
}

.instance_task_note {
    white-space: pre-wrap; 
    /* background-color: rgb(255, 255, 240);  */
    border: 1px solid #add8e645;
    margin-bottom: 2px;
    /* color: darkblue; */
    padding: 2px;
}

.instance_task_note a {
    /* color: darkblue; */
}

a:hover .instance_task_note {
    text-decoration: underline;
}
/* scrollbars */

/* webkit */
/* width */
::-webkit-scrollbar {
    width: 5px;
    /* border: 1px #004085 solid; */
}
  
/* Track */
::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 5px;
}
  
/* Handle */
::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
    width: 5px;
}
  
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.rise-shake {
    animation: jump-shaking 0.83s 3;
}
@keyframes jump-shaking {
    0% { transform: translateX(0) }
    25% { transform: translateY(-5px) }
    35% { transform: translateY(-5px) rotate(17deg) }
    55% { transform: translateY(-5px) rotate(-17deg) }
    65% { transform: translateY(-5px) rotate(17deg) }
    75% { transform: translateY(-5px) rotate(-17deg) }
    100% { transform: translateY(0) rotate(0) }
}
#task-list {
    /* max-height: 50vh; 
    overflow-y: auto;  */
}
@media screen and (max-width: 963px) {
    .detail-card{
        min-width: 275px;
        /* width: 96vw; */
    }
    #task-list, #action-buttons, #comments {
        width: 100%;
        min-width: 300px;
    }
}
@media screen and (min-width: 964px) {
    .detail-card{
        width: 100%;
    }
    #task-list, #action-buttons, #comments {
        width: 70%; 
    }
}

/*for activity criteria preview*/
details[data-popover] > summary:focus {
  outline: none;
}
details[data-popover] > summary::-webkit-details-marker {
  display: none;
}
details[data-popover] > summary {
  list-style: none;
}
details[data-popover] > summary {
  list-style: none;
  text-decoration: underline dotted teal;
  padding-top: .5rem;
}
/*details[data-popover] {*/
/*  position: relative;*/
/*}*/
details[data-popover] > summary + * {
  position: absolute;
}

/* instance task note p */
.instance_task_note p {
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

.scrollable-menu {
    height: auto;
    max-height: 200px;
    overflow-x: hidden;
}

.thumbnail {
    width: 180px;
    height: 140px;
    object-fit: cover;
    overflow: hidden;
}
textarea#description {max-width: 100%;}

@media (max-width: 991px) {
    .top-level-menu-bg {
        background-color: var(--bs-body-bg);
    }
    .top-level-menu-bg .nav-link {
        color: var(--bs-body-color) !important;
    }
    .top-level-menu-bg .nav-link:hover {
        color: var(--bs-emphasis-color) !important;
    }
    .top-level-menu-bg .nav-link:focus {
        color: var(--bs-emphasis-color) !important;
    }
    #sidebarMenu li a.nav-link {
        color: var(--bs-body-color) !important;
    }
}

.loader {
    width: 16px;
    height: 16px;
    margin: 4px 0;
    border: 3px solid #FFF;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}
.loader::after {
    content: '';  
    box-sizing: border-box;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    margin: 4px 0;
    border-radius: 50%;
    border: 3px solid;
    border-color: #FF3D00 transparent;
}

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

#search::placeholder {
    color: #6c757d;
    opacity: 1;
}
#search::-ms-input-placeholder {
    color: #6c757d;
}

@media screen and (min-width: 425px) {
    .main-search-results {
        position:absolute; 
        z-index: 100000; 
        min-width: 14rem; 
        top: 3.5rem; 
        margin: 0 auto;
    }
}
@media screen and (max-width: 424px) {
    .main-search-results {
        position:absolute; 
        z-index: 100000; 
        min-width: 14rem; 
        top: 8.5rem;
        margin: 0 auto;
    }
}
.my-indicator{
    display:none;
}
.htmx-request .my-indicator{
    display:inline;
}
.htmx-request.my-indicator{
    display:inline;
}


/* Custom styles for the task instance summary page */
/* Base theme-adaptive styles */
/* .card {
    border-color: rgba(var(--bs-secondary-rgb, 108, 117, 125), 0.25);
} */

/* Dark theme specific adjustments */
.dark-theme .card {
    background-color: rgba(255, 255, 255, 0.05);
}

.dark-theme .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

.dark-theme .badge-light {
    background-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9) !important;
}

.dark-theme .btn-outline-primary,
.dark-theme .btn-outline-secondary,
.dark-theme .btn-outline-danger {
    border-color: rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.9);
}

.dark-theme .progress {
    background-color: rgba(255, 255, 255, 0.2);
}

.dark-theme .card-title {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Ensure status indicators have good contrast */
.dark-theme .status-indicator {
    opacity: 0.9;
}

/* Make pagination controls more visible on dark themes */
.dark-theme .page-link {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.dark-theme .page-item.active .page-link {
    background-color: var(--primary, #007bff);
    border-color: var(--primary, #007bff);
}

.dark-theme .page-item.disabled .page-link {
    background-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
}

/* Planning indicators for Park Log items */
.border-left-warning {
    border-left: 4px solid #ffc107 !important;
  }
  
  .badge-planning {
    background-color: #ffc107;
    color: #212529;
  }
  
  /* Create a subtle background for cards with planning needs */
  .card.needs-planning {
    background-color: #fffbf0;
  }
  
  /* For highlighting recommended options */
  .highlighted-option {
    border-left: 3px solid #ffc107;
    padding-left: 10px;
    background-color: #fff9e6;
  }
  

#auth_user_email__label {
    margin-bottom: 0rem;
    display: block;
}

/* Fix missing dropdown arrows for Bootstrap 5 form-select elements and all select elements */
.form-select, 
select.form-control,
select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 16px 12px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    padding-right: 2.25rem !important;
}

/* Dark theme support for dropdown arrows */
.dark-theme .form-select,
.dark-theme select.form-control,
.dark-theme select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23f8f9fa' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e") !important;
}

/* ==================================================================
   HTMX Smooth Transitions - Eliminates White Screen Flash
   ================================================================== */

/* Smooth fade transitions for HTMX content swapping */
#main {
    transition: opacity 200ms ease-in-out;
}

/* Fade out during swap */
#main.htmx-swapping {
    opacity: 0;
}

/* Fade in after settling */
#main.htmx-settling {
    opacity: 1;
}

/* View transitions for smooth page changes (modern browsers) */
@supports (view-transition-name: main-content) {
    #main {
        view-transition-name: main-content;
    }
}

/* Alternative: slide transitions for work session workflow */
.work-session-transition {
    animation: slideIn 300ms ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fade-in animation for full page reloads (non-HTMX navigation) */
#work-session-active,
#work-session-review,
#planning-form {
    animation: fadeIn 250ms ease-in-out;
    /* Prevent layout shift during page load */
    min-height: 400px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Prevent scrollbar layout shift - always reserve space for scrollbar */
html {
    overflow-y: scroll;
}
/* Notes sidebar visibility fixes */
.notes-sidebar {
    min-height: 200px;
    border-left: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
}

.notes-sidebar .card {
    min-height: 180px;
    border: 1px solid var(--bs-border-color);
}

.empty-notes-placeholder {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* Ensure sidebar column has minimum height and border */
.col-12.col-lg-4:nth-child(2) {
    min-height: 200px;
}

/* Fix for empty sidebar visibility */
.card.h-100 {
    min-height: 180px !important;
}
