/**
 * ExploreXR Admin UI Styles
 * 
 * Styles for modal dialogs and UI elements in the admin dashboard.
 */

/* Model Preview Modal */
.explorexr-model-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow: auto;
}

.explorexr-model-modal-content {
    position: relative;
    background-color: #fefefe;
    margin: 20px auto;
    padding: 20px;
    border-radius: 5px;
    width: 95%;
    height: 90%;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s ease-out;
}

.explorexr-model-modal-content model-viewer {
    width: 100%;
    height: calc(100% - 60px); /* Account for title and padding */
    min-height: 500px;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.explorexr-model-close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #555;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.explorexr-model-close:hover,
.explorexr-model-close:focus {
    color: #000;
    text-decoration: none;
}

/* Modal specific title styling */
.explorexr-model-modal .explorexr-model-title {
    margin-top: 0;
    padding-right: 30px;
    font-size: 18px;
    color: #23282d;
    border-bottom: 1px solid #e2e4e7;
    padding-bottom: 10px;
}

/* Model Viewer in Modal */
#explorexr-model-viewer {
    width: 100%;
    margin-top: 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

/* Copy Success Animation */
.success-icon {
    color: #2AACE2 !important;
    animation: successPulse 0.3s ease-out;
}

@keyframes successPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive Modal */
@media (max-width: 768px) {
    .explorexr-model-modal-content {
        width: 95%;
        height: 90%;
        margin: 20px auto;
        padding: 15px;
    }
    
    .explorexr-model-title {
        font-size: 16px;
    }
}

/* Focus styles for accessibility */
.explorexr-model-close:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Loading state for model viewer */
#explorexr-model-viewer[src=""] {
    background-color: #0D152C;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23666"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 48px 48px;
}
