:root {
    --san-serif-font: 'Roboto', sans-serif;
    --san-serif2-font: 'Sora', sans-serif;
    --serif-font: 'Roboto Slab', serif;
    --header-font-color: #637675;
    --dark-font1: #121212;
    --light-font1: #939393;
    --btn-background-color: #EAB749;
    --btn-background-color-hover: #DFAA3A;
    --btn2-background-color: #637675;
    --btn2-background-color-hover: #546463;
    --border-radius1: 4px;
}


body {
    font-family: Arial, sans-serif;
    padding: 20px;
    max-width: 100vw;
    margin: 0;
    box-sizing: border-box;
    position: relative;
    margin-bottom: 100px;
}

h1 {
    color: var(--header-font-color);
    text-align: center;
    font-size: 20px;
    margin: 0 auto;
    font-family: var(--san-serif2-font);
    letter-spacing: -0.25px;

}

header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}


#hawx-logo {
    flex: 1;
    width: 48px;
    height: 48px;
    fill: var(--header-font-color);
}

[aria-describedby="instructions-dialog"] {
    z-index: 10000;
    margin-bottom: 60px;
}

#instruction-icon {
    width: 24px;
    height: 24px;
    fill: var(--header-font-color);
    position: fixed;
    top: 8px;
    right: 8px;
}

.instruction-space-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.instruction-space-between div svg {
    width: 32px;
    height: 32px;
}

.instruction-space-between div:first-child {
    margin-right: 32px;
}

.instruction-btn {
    background-color: var(--btn2-background-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.instruction-btn:hover {
    background-color: var(--btn2-background-color-hover);
}

#stage-1-instructions {
    padding: 0;
    padding-left: 20px;
    margin: 0;
    list-style-type: none;
}

ul#stage-1-instructions ul {
    padding-left: 12px;
}

#stage-1-instructions li:first-child {
    margin-top: 24px;
    list-style-type: circle;
}

ul#image-editor-btn-instructions {
    margin: 0;
    padding: 0;
}


header h1 {
    flex: 5;
}

#stage-navigation-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #f8f8f8;
    height: 60px;
    border-top: 1px solid #ddd;
    box-shadow: 0px -2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

#stage-navigation {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

#stage-indicator {
    max-width: 200px;
    text-align: center;
    font-weight: bold;
}

.stage-button {
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: inherit;
    cursor: pointer;
    height: 100%;
    width: 60px;
}

#next-stage {
    border-left: 1px solid #ddd;
}

#prev-stage {
    border-right: 1px solid #ddd;
}

.arrow-icon {
    width: 24px;
    height: 24px;
    fill: var(--btn2-background-color);
}

.arrow-icon:hover {
    fill: var(--btn2-background-color-hover);
}

.stage-button:disabled .arrow-icon {
    opacity: 0.2;
    cursor: not-allowed;
}

@keyframes spin {
    to {
        -webkit-transform: rotate(360deg);
    }
}

@-webkit-keyframes spin {
    to {
        -webkit-transform: rotate(360deg);
    }
}

/* Loading Icon */
.lds-grid {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}

.lds-grid div {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--btn2-background-color);
    animation: lds-grid 1.2s linear infinite;
}

.lds-grid div:nth-child(1) {
    top: 8px;
    left: 8px;
    animation-delay: 0s;
}

.lds-grid div:nth-child(2) {
    top: 8px;
    left: 32px;
    animation-delay: -0.4s;
}

.lds-grid div:nth-child(3) {
    top: 8px;
    left: 56px;
    animation-delay: -0.8s;
}

.lds-grid div:nth-child(4) {
    top: 32px;
    left: 8px;
    animation-delay: -0.4s;
}

.lds-grid div:nth-child(5) {
    top: 32px;
    left: 32px;
    animation-delay: -0.8s;
}

.lds-grid div:nth-child(6) {
    top: 32px;
    left: 56px;
    animation-delay: -1.2s;
}

.lds-grid div:nth-child(7) {
    top: 56px;
    left: 8px;
    animation-delay: -0.8s;
}

.lds-grid div:nth-child(8) {
    top: 56px;
    left: 32px;
    animation-delay: -1.2s;
}

.lds-grid div:nth-child(9) {
    top: 56px;
    left: 56px;
    animation-delay: -1.6s;
}

@keyframes lds-grid {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

#canvas-loading-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#canvas-loading-wrapper.hide {
    display: none;
}

.loading-indicator {
    display: none;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: translateY(-50%) rotate(0deg);
    }

    100% {
        transform: translateY(-50%) rotate(360deg);
    }
}

#image-editor {
    display: none;
    margin: 0;
    padding: 0;
    width: calc(100% + 40px);
    margin-left: -21px;
    position: relative;
    overflow: hidden;
}

#canvas-wrapper {
    width: 100%;
    margin: 0 auto;
    border: 1px solid #ddd;
    max-height: 70vh;
}

#canvas-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 12px;
}

#canvas-controls>button {
    flex: 4;
    min-height: 60px;
}

/* If screen width over 640px, overflow-x: hidden; */
@media (min-width: 640px) {
    #canvas-wrapper {
        overflow-x: hidden;
    }
}

/* Add custom scrollbar styles for better visibility */
#canvas-wrapper::-webkit-scrollbar {
    width: 12px;
    height: 36px;
}

#canvas-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#canvas-wrapper::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 6px;
    border: 3px solid #f1f1f1;
    max-width: 12px;
}

#canvas-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}

#icon-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
    padding: 0 10px;
}

.icon {
    width: 40px;
    height: 40px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.icon:hover {
    background-color: #e0e0e0;
}


#canvas-container {
    border: 1px solid #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 100%;
    min-height: 100%;
    max-width: 100%;
    z-index: 1;
}

#canvas {
    display: block;
}

.button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: var(--btn2-background-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-right: 10px;
    margin-bottom: 10px;
}

.button:hover {
    background-color: var(--btn2-background-color-hover);
}

#button-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

#item-list-container {
    background-color: #f8f8f8;
    border-radius: var(--border-radius1);
    padding: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 8px;
}

#item-list-container h2 {
    color: #4a4a4a;
    font-size: 24px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.item-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.item-button {
    background-color: #e0e0e0;
    border: none;
    border-radius: var(--border-radius1);
    padding: 15px;
    text-align: left;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.item-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.item-button.completed {
    background-color: #a5d6a7;
}

.item-button .icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-button span {
    flex-grow: 1;
}


.item-button .completion-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-left: 10px;
    background-color: rgb(240, 62, 62);
    box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.45);
    border: 0.2px solid rgb(214, 56, 56);
}

.item-button.completed .completion-indicator {
    background-color: #00ff00;
    border: 0.2px solid rgb(0, 198, 0);
}

.search-container {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.search-container {
    display: flex;
    align-items: stretch;
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.input-container {
    flex-grow: 1;
    position: relative;
    display: flex;
}

#address-input {
    flex-grow: 1;
    padding: 10px 15px;
    font-size: 16px;
    border: 2px solid var(--btn2-background-color);
    border-radius: 4px;
    outline: none;
}

#address-input:focus {
    border-color: var(--btn2-background-color-hover);
}

#address-input.with-zoom-controls {
    border-radius: 4px 0 0 4px;
    border-right: none;
}


.zoom-btn {
    width: 50px;
    height: auto;
    font-size: 24px;
    font-weight: bold;
    background-color: var(--btn2-background-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    height: 31px;
}

.zoom-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.zoom-btn:not(:first-child) {
    border-left: 1px solid #ccc;
}

.zoom-btn:hover {
    background-color: var(--btn2-background-color-hover);
}

#upload-image-btn,
#toggle-layer-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#upload-image-btn svg,
#earth-zoom-out,
#earth-zoom-in,
#add-polygon-icon {
    width: 48px;
    height: 48px;
}

#toggle-layer-btn svg {
    width: 48px;
    height: 48px;
    fill: white;
}


.no-close .ui-dialog-titlebar-close {
    display: none;
}

.report-question {
    margin-bottom: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 4px;
}

.report-question-text {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.report-question-input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    flex: 1;
}

.select2-container--default .select2-selection--multiple {
    border: 1px solid #ccc;
    border-radius: 4px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #e4e4e4;
    border: 1px solid #aaa;
    border-radius: 4px;
    padding: 5px 5px 5px 20px;
    line-height: 14.5px;
}

.other-input {
    margin-top: 10px;
}


.select2-container .select2-selection--single,
.select2-container .select2-selection--multiple {
    height: fit-content;
    min-height: 36.5px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    line-height: 36.5px;
    /* Match the height for vertical alignment */
}

.select2-container .select2-selection--multiple {
    line-height: 25.5px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    background-color: transparent;
    border: none;
}



.icon-group-button {
    width: 60px;
    height: 60px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.icon-group-button:hover {
    background-color: #e0e0e0;
}

.icon-button {
    display: flex;
    align-items: center;
    padding: 10px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    transition: background-color 0.3s;
}

.icon-button:hover {
    background-color: #f0f0f0;
}

.icon-image {
    width: 50px;
    height: 50px;
    margin-right: 10px;
}

.icon-name {
    flex-grow: 1;
    text-align: left;
}

#trap-product-editor {
    position: relative;
    z-index: 1000;
    margin-bottom: 12px;
    /* Ensure this container is above the canvas */
}

#icon-container {
    padding: 0;
    position: relative;
    z-index: 1001;
    /* Above trap-product-editor */
    overflow: visible;
    /* Allow dropdown to overflow */
    margin: 0;
}

.icon-dropdown {
    display: none;
    flex-direction: column;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    /* Position right below the icon container */
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1002;
    /* Above icon-container */
    max-height: 300px;
    /* Or any appropriate value */
    overflow-y: auto;
}

@media (max-width: 768px) {
    .icon-dropdown {
        max-width: none;
    }

    .select2-container {
        width: 100% !important;
    }
}

/* Adjust the Swiper container if needed */
.swiper-container {
    width: 100%;
    padding: 0;
    overflow: visible;
    /* Allow dropdown to overflow */
}

.swiper-slide {
    width: auto;
}

#panda-docs {
    display: flex;
    justify-content: center;
    align-items: center;
    width: calc(100% + 20px);
    flex-direction: column;
}

#panda-docs iframe {
    width: calc(100% + 30px);
    margin-left: -20px;
    height: 80vh;
}


/* The switch - the box around the slider */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

/* Hide default HTML checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--btn2-background-color);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--btn2-background-color);
}

input:checked+.slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.horizontal-question {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

/* Styling for required questions */
.report-question.required .report-question-text::after {
    content: '*';
    color: #e53935;
    margin-left: 5px;
}

/* Styling for unanswered required questions */
.report-question.required.unanswered {
    background-color: #ffebee;
    padding: 10px;
    border-radius: 4px;
    border-left: 4px solid #e53935;
}

/* Styling for answered questions */
.report-question.answered {
    background-color: white;
    border: none;
}

/* Improve visibility of the required indicator */
.required-indicator {
    color: #e53935;
    font-weight: bold;
    margin-left: 5px;
}

/* Add a completion indicator */
.report-question.required.unanswered::after {
    content: '✘';
    color: #e53935;
    position: absolute;
    right: 10px;
    top: 4px;
    font-size: 1.2em;
}


/* Style for select2 dropdown to match other inputs */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border-color: #ccc;
    border-radius: 4px;
}

/* Highlight select2 dropdown when it's a required field and unanswered */
.report-question.required.unanswered .select2-container--default .select2-selection--single,
.report-question.required.unanswered .select2-container--default .select2-selection--multiple {
    border-color: #e53935;
}

.loading-indicator {
    padding: 10px;
    margin: 5px;
    background: #f0f0f0;
    border-radius: 4px;
}

.image-preview-container {
    position: relative;
    display: inline-block;
    margin: 5px;
}

.remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    background: red;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-preview {
    margin-top: 16px;
}

.select2-container--stay-open .select2-dropdown {
    display: block !important;
}

/* Custom styling for Select2 dropdown with text input support */

/* Style for the custom entry tags */
.select2-container--default .select2-selection--multiple .select2-selection__choice.custom-entry {
    background-color: #e8f0fe;
    border-color: #2271b1;
    padding: 4px 8px;
    margin: 2px;
    border-radius: 4px;
}

/* Minimal styling for custom entries in Select2 multiselect */
.select2-container--default .select2-selection--multiple .select2-selection__choice .custom-entry {
    font-style: italic;
    color: #2271b1;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice:has(.custom-entry) {
    background-color: #e8f0fe;
    border-color: #2271b1;
}

.custom-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex-direction: row;
    box-sizing: border-box;
    margin-top: 8px;
}

.custom-input-wrapper .btn {
    background-color: var(--btn2-background-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    box-sizing: border-box;
    height: 100%;
}

.custom-input-wrapper input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    width: calc(100% - 64px);
    box-sizing: border-box;
    margin-top: 0;
}
