/*
 * Styles for 3D Model Viewer and AR Functionality
 * This stylesheet contains all the necessary styles for:
 * - 3D model viewer
 * - Model tabs
 * - AR overlay
 * - View in room functionality
 */

/* Model Viewer */
model-viewer {
    width: 100%;
    height: 400px;
    background-color: #f8f9fa;
    --poster-color: transparent;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 4px;
}

model-viewer::part(default-progress-bar) {
    height: 5px;
    background-color: #007bff;
}

model-viewer::part(default-ar-button) {
    background-color: #ffffff;
    color: #000000;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

model-viewer::part(default-ar-button):hover {
    background-color: #f0f0f0;
}

/* Model Tabs */
.model-tabs {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

.model-tab {
    padding: 10px 15px;
    cursor: pointer;
    background-color: #f8f9fa;
    margin-right: 5px;
    border: 1px solid #dee2e6;
    border-bottom: none;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    position: relative;
    top: 1px;
    transition: all 0.2s ease;
}

.model-tab:hover {
    background-color: #e9ecef;
}

.model-tab.active {
    background-color: #fff;
    border-bottom: 1px solid #fff;
    color: #007bff;
    font-weight: 500;
}

.model-content {
    display: none;
}

.model-content.active {
    display: block;
}

/* AR Overlay */
.ar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: none;
    overflow: hidden;
}

.ar-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ar-close {
    position: absolute;
    top: 15px;
    right: 15px;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 10000;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.ar-close:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.ar-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 10000;
    padding: 10px;
}

.ar-button {
    background-color: #ffffff;
    color: #000000;
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    margin: 0 5px;
    cursor: pointer;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.ar-button:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* View in Room Button */
.view-in-room-btn {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    width: 100%;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.view-in-room-btn:hover {
    background-color: #0069d9;
}

.view-in-room-btn i {
    margin-right: 8px;
}

/* AR Output area */
#arOutput {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

#arOutput canvas {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    cursor: move;
}

#arOutput img {
    max-width: 300px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

#arOutput p {
    margin-bottom: 20px;
    font-size: 18px;
    text-align: center;
    max-width: 500px;
}

/* Take Photo Button */
#takePhotoBtn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    background-color: #ffffff;
    color: #000000;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#takePhotoBtn:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

#takePhotoBtn i {
    margin-right: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    model-viewer {
        height: 300px;
    }

    .model-tab {
        padding: 8px 12px;
        font-size: 14px;
    }

    #arOutput canvas {
        max-height: 60vh;
    }

    #arOutput p {
        font-size: 16px;
    }
}
