/**
 * MetFi 3D Viewer - Styles
 */

/* Wrapper */
.metfi-3d-viewer-wrapper {
    width: 100%;
    position: relative;
    margin: 20px 0;
}

.metfi-3d-viewer-wrapper h2 {
    margin-bottom: 15px;
}

.metfi-3d-viewer-inner {
    position: relative;
}

/* Model viewer */
.metfi-3d-viewer {
    width: 100%;
    height: 500px;
    display: block;
    position: relative;
    background-color: #f0f0f0;
    outline: none;
    border-radius: 4px;
}

/* Progress bar */
.progress-bar {
    display: block;
    width: 80%;
    height: 4px;
    max-width: 400px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: opacity 0.3s;
}

.progress-bar.hide {
    opacity: 0;
    pointer-events: none;
}

.update-bar {
    background: #007cba;
    width: 0%;
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Loading text */
.loading-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% + 20px));
    font-size: 14px;
    color: #666;
    text-align: center;
    pointer-events: none;
}

/* AR button */
.ar-button {
    background-color: #007cba;
    color: white;
    cursor: pointer;
    border-radius: 4px;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    position: absolute;
    bottom: 16px;
    right: 16px;
}

.ar-button:hover {
    background-color: #005a87;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

/* Fullscreen button */
.metfi-3d-fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
    line-height: 0;
}

.metfi-3d-fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

.metfi-3d-fullscreen-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

model-viewer:fullscreen {
    background: #000;
    height: 100vh;
}

model-viewer:fullscreen .metfi-3d-fullscreen-btn {
    background: rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .metfi-3d-viewer {
        height: 350px;
    }

    .ar-button {
        bottom: 10px;
        right: 10px;
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Accessibility */
.metfi-3d-viewer:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Print */
@media print {
    .metfi-3d-viewer-wrapper {
        display: none;
    }
}
