html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: sans-serif;
    background-color: #f3f4f6;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

#logo {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 50;
    width: 192px;
    height: auto;
}

#loading {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(229, 231, 235, 0.8);
    z-index: 50;
}

#loading-bar {
    width: 192px;
    height: 4px;
    background-color: #d1d5db;
    border-radius: 2px;
    overflow: hidden;
}

#loading-bar-progress {
    height: 100%;
    background-color: #10B981;
    transition: width 0.3s ease-in-out;
    width: 0%;
}

#loading-text {
    margin-top: 8px;
    font-size: 18px;
    color: #374151;
}

model-viewer {
    width: 100%;
    height: 100vh;
    background-color: #e5e7eb;
    overflow: hidden;
}

/* Model viewer progress bar and error message styles */
model-viewer .progress-bar {
    display: block;
    width: 33%;
    height: 10px;
    max-width: 100%;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate3d(-50%, -50%, 0);
    border-radius: 6px;
    box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.25);
    transition: opacity 0.3s;
    background-color: rgba(255, 255, 255, 0.7);
    overflow: hidden;
}

model-viewer .update-bar {
    background-color: #3b82f6;
    width: 0%;
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s;
}

model-viewer .error {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ef4444;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    max-width: 270px;
    font-weight: 600;
    margin: 20px auto;
}

#controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.control-button {
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    display: flex;
    align-items: center;
    overflow: hidden;
    height: 40px;
    transition: all 0.3s ease-in-out;
    width: 40px;
}

.control-button:hover {
    width: 288px;
}

#annotation-control:hover {
    width: 192px;
    cursor: pointer;
}

.icon {
    width: 40px;
    height: 40px;
    background-position: center;
    background-size: cover;
    flex-shrink: 0;
}

.control-content {
    display: flex;
    align-items: center;
    padding: 0 8px;
    white-space: nowrap;
}

.slider-container {
    display: flex;
    align-items: center;
    margin-left: 8px;
}

input[type="range"] {
    width: 96px;
    margin: 0 8px;
}

.value-display {
    width: 40px;
    text-align: right;
}

#annotation-container {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 192px;
    max-height: 80%;
    overflow-y: auto;
}

#hotspot-preview {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(59, 130, 246, 0.5);
    position: fixed;
    pointer-events: none;
    z-index: 50;
    display: none;
}

#hotspot-edit-panel {
    position: absolute;
    background-color: white;
    padding: 12px;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: none;
    z-index: 50;
    max-width: 300px;
    width: calc(100% - 40px);
    box-sizing: border-box;
}

.input-field {
    width: 100%;
    margin-bottom: 8px;
    padding: 4px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
}

.color-options {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.color-option {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.blue-color {
    background-color: #3b82f6;
}

.red-color {
    background-color: #ef4444;
}

.green-color {
    background-color: #10b981;
}

.yellow-color {
    background-color: #f59e0b;
}

.button {
    padding: 4px 12px;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    margin-right: 8px;
}

.save-button {
    background-color: #10b981;
}

.save-button:hover {
    background-color: #059669;
}

.cancel-button {
    background-color: #ef4444;
}

.cancel-button:hover {
    background-color: #dc2626;
}

.delete-button {
    background-color: #6b7280;
}

.delete-button:hover {
    background-color: #4b5563;
}

.image-upload-container {
    margin-bottom: 8px;
}

.image-upload-label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.image-upload {
    width: 100%;
    margin-bottom: 8px;
}

#image-preview-container {
    margin-top: 8px;
    margin-bottom: 8px;
}

#image-preview {
    max-width: 100%;
    max-height: 100px;
    margin-bottom: 4px;
    border-radius: 4px;
    cursor: pointer;
}

.remove-button {
    background-color: #ef4444;
    font-size: 12px;
    padding: 2px 8px;
}

.remove-button:hover {
    background-color: #dc2626;
}

.annotation {
    position: fixed;
    background-color: white;
    opacity: 0.9;
    border-radius: 6px;
    padding: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
    display: none;
    z-index: 10000;
    pointer-events: all !important;
}

.annotation a {
    display: none !important;
}

.hotspot-thumbnail {
    max-width: 100px;
    max-height: 60px;
    margin-top: 8px;
    border-radius: 4px;
    cursor: default;
    position: relative;
    z-index: 10001;
    pointer-events: auto;
}

/* Style for image with CORS error */
.hotspot-thumbnail.error {
    position: relative;
    background-color: #f3f4f6;
    border: 1px dashed #d1d5db;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 40px;
}

.hotspot-thumbnail.error::before {
    content: "⚠️";
    font-size: 16px;
}

.hotspot-thumbnail.error::after {
    content: "Image Error";
    font-size: 10px;
    position: absolute;
    bottom: 2px;
    left: 0;
    right: 0;
    text-align: center;
    color: #ef4444;
}

/* Hide any buttons that might be added to the image */
.hotspot-thumbnail + a,
.hotspot-thumbnail + button {
    display: none !important;
}

.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20000;
}

.image-modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

/* Style for image loading in modal */
.image-modal-content.loading {
    opacity: 0.5;
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

/* Add a loading spinner style */
.loading {
    position: relative;
    min-height: 100px;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spinner 0.6s linear infinite;
}

/* Loading indicator for modal */
.image-modal-loading {
    position: absolute;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 4px;
    z-index: 20001;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* New styles for CORS errors */
img.cors-error {
    position: relative;
    min-width: 50px;
    min-height: 40px;
    background-color: #f9fafb;
    border: 1px dashed #d1d5db;
}

img.cors-error::after {
    content: "Image failed to load";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
}

/* Style for upload error state */
.upload-error {
    position: relative;
    border: 1px solid #ef4444;
    background-color: #fee2e2;
    border-radius: 4px;
}

.upload-error::after {
    content: "Upload failed";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #b91c1c;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    #logo {
        width: 120px;
    }
    
    #controls {
        bottom: 10px;
    }
    
    .control-button {
        height: 36px;
        width: 36px;
    }
    
    .icon {
        width: 36px;
        height: 36px;
    }
    
    .control-button:hover {
        width: 200px;
    }
    
    #annotation-control:hover {
        width: 150px;
    }
    
    input[type="range"] {
        width: 80px;
    }
    
    #hotspot-edit-panel {
        max-width: 280px;
        padding: 10px;
    }
    
    .input-field {
        font-size: 16px; /* Prevent auto-zoom on iOS */
    }
    
    .button {
        padding: 6px 10px;
        margin-right: 6px;
        font-size: 14px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    #logo {
        width: 100px;
        top: 10px;
        left: 10px;
    }
    
    #hotspot-edit-panel {
        position: fixed !important; /* Override absolute positioning */
        max-width: 90% !important;
        width: 280px !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important; /* Ensure proper centering */
        max-height: 90vh;
        overflow-y: auto;
        z-index: 1000;
        box-sizing: border-box;
        padding-bottom: 16px; /* Add extra padding at bottom to ensure buttons are visible */
    }
    
    .control-button:hover {
        width: 170px;
    }
    
    #annotation-control:hover {
        width: 130px;
    }
    
    input[type="range"] {
        width: 70px;
    }
    
    .annotation {
        max-width: 80%;
    }
}

/*# sourceMappingURL=main.css.map*/