* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    height: 100%;
    font-family: Arial, sans-serif;
}

.container {
    display: flex;
    flex-direction: row-reverse;
    height: 100%;
}

.logo-container {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #444;
}

.logo {
    max-width: 100%;
    height: auto;
    width: auto;
    max-height: 100px;
}

#hotspot-id-display {
    position: absolute;
    top: 1px;
    left: 100px;
    font-size: 14px;
    color: #666;
    background-color: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
}

.form-header {
    position: relative;
}

#side-menu {
    width: 25vw;
    background-color: #333;
    color: white;
    padding: 10px;
    overflow-y: auto;
}

.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto;
}

#search-input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: none;
    border-radius: 4px;
    background-color: #444;
    color: white;
    font-size: 14px;
}

#search-input:focus {
    outline: none;
    background-color: #555;
}

#search-input::placeholder {
    color: #aaa;
}

#side-menu ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#side-menu li.hotspot-item {
    padding: 10px;
    cursor: pointer;
    background-color: #444;
    margin-bottom: 5px;
    border-radius: 4px;
    transition: background-color 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#side-menu li.hotspot-item:hover {
    background-color: #555;
}

#ear-selector {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

#ear-selector button {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin: 0 10px;
    transition: background-color 0.3s;
}

#ear-selector button:hover {
    background-color: #45a049;
}

#ear-selector button.active {
    background-color: #79075c;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

#hotspot-type {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
}

#filter-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.filter-button {
    padding: 8px 12px;
    background-color: #9ca09c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    text-align: center;
    width: 100%;
}

.filter-button:hover {
    background-color: #45a049;
}

.filter-button.active {
    background-color: purple;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.model-viewer-container {
    flex-grow: 1;
    min-height: 300px;
    border: 5px solid rgba(0, 0, 0, 0.1);
    border-radius: 30px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
}

#protocol-navigation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    padding: 0 20px;
}

#protocol-prev, #protocol-next {
    background-color: rgba(76, 175, 80, 0.7);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    pointer-events: auto;
    font-size: 18px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

#protocol-prev:hover, #protocol-next:hover {
    background-color: rgba(69, 160, 73, 0.9);
}

model-viewer {
    width: 100%;
    height: 100%;
    position: relative;
}

/* SVG Overlay */
model-viewer svg {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0; /* Lower z-index */
}

.button-container {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.button, #home-button {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s;
}

.button:hover, #home-button:hover {
    background-color: #45a049;
}

.form-container {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    max-width: 600px;
    margin: 0 auto;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close-button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

form input[type="text"],
form textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.submit-button {
    background-color: #4CAF50;
}

.delete-button {
    background-color: #f44336;
}

.delete-button:hover {
    background-color: #d32f2f;
}

.circular-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #4CAF50;
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.circular-button:hover {
    background-color: #45a049;
}

.hotspot-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    background-color: #444;
    margin-bottom: 5px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.hotspot-item:hover {
    background-color: #555;
}

.hotspot-name {
    flex-grow: 1;
    padding-right: 10px;
}

.info-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
    flex-shrink: 0;
}

.info-button:hover {
    background-color: #45a049;
}

.info-box {
    background-color: #555;
    border-radius: 4px;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.4;
    color: #fff;
}

.info-box p {
    margin: 5px 0;
}

.info-box .ql-editor {
    padding: 0;
    background-color: transparent;
}

.info-box .ql-editor p {
    margin-bottom: 10px;
}

.info-box .ql-editor ul, 
.info-box .ql-editor ol {
    padding-left: 20px;
    margin-bottom: 10px;
    list-style-position: inside;
}

.info-box .ql-editor li {
    padding: 2px 0;
    background-color: transparent;
    margin-bottom: 2px;
    display: list-item;
}

.info-box .ql-editor ul > li {
    list-style-type: disc;
}

.info-box .ql-editor ol > li {
    list-style-type: decimal;
}

#info-editor {
    background-color: #fff;
    border-radius: 4px;
    margin-bottom: 15px;
}

#info-editor .ql-editor {
    min-height: 150px;
}

.edit-icon {
    cursor: pointer;
    color: #fff;
}

.edit-icon:hover {
    opacity: 0.8;
}

.hotspot {
    font-size: 5px;
    display: block;
    width: 7px !important;
    height: 7px !important;
    border-radius: 10px;
    border: none;
    color: red;
    background-color: red !important;
    box-sizing: border-box;
    pointer-events: none;
    transition: opacity 0.1s;
    padding: 0;
    margin: 0;
}

.annotation {
    background-color: white;
    color: purple;
    position: absolute;
    transform: translate(10px, 10px);
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
    font-family: Futura, Helvetica Neue, sans-serif;
    font-size: 16px;
    font-weight: 700;
    padding: 10px;
    text-align: left;
    word-wrap: break-word;
    pointer-events: none;
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    #side-menu {
        width: 100%;
        max-height: 25vh;
    }

    .main-content {
        padding: 10px;
    }

    .model-viewer-container {
        min-height: 200px;
    }

    .button-container {
        flex-direction: column;
        gap: 10px;
    }

    .button {
        width: 100%;
    }

    #filter-buttons {
        flex-direction: row;
        flex-wrap: nowrap;
    }

    .filter-button {
        flex: 1;
        font-size: 12px;
        padding: 6px 8px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}


/*** NEW MODAL CSS**/
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 1200px;
    height: 60vh; /* Fixed height */
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transform: translateY(-20px);
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    overflow: hidden; /* Hide overflowing content */
}

.modal.show .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.instruction-steps-container {
    position: relative;
    width: 100%;
    height: calc(100% - 60px); /* Adjust based on your navigation buttons' height */
}

.instruction-step {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    overflow-y: auto; /* Allow scrolling if content is too long */
}

.instruction-step.active {
    opacity: 1;
    transform: translateX(0);
}
  
  .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
  }
  
  .close:hover,
  .close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
  }
  
  .instruction-step {
    text-align: center;
  }
  
  .instruction-image {
    display: block;
    margin: 20px auto;
  }
  
  .navigation-buttons {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}
  
  .nav-btn {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
  }
  
  .nav-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
  }
  
  h2 {
    font-size: 24px;
    margin-bottom: 15px;
  }
  
  p {
    font-size: 18px;
    line-height: 1.5;
  }

  .lottie-pair {
    display: flex;
    justify-content: center;
    gap: 20px; /* Space between animations */
}

.lottie-single {
    display: flex;
    justify-content: center; /* Center the single animation */
    margin: 20px 0;
}

.lottie-container {
    width: 100%;
    max-width: 350px;
    height: 100%;
    max-height: 350px;
}
.mirrored {
    transform: scaleX(-1); /* Flip horizontally */
}

.lottie-pair, .lottie-single {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60%; /* Adjust as needed */
}

#success-animation {
    display: none; /* Hidden by default */
    width: 175px;
    height: 175px;
    margin: 0 auto; /* Center horizontally */
    text-align: center;
}


/****swap color button stylings**/ 

#swap-color-btn {
    background-color: #f1c40f; /* Yellow color for distinction */
}

#swap-color-btn:hover {
    background-color: #f39c12;
}

#swap-color-btn.active {
    background-color: #e67e22;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}