/**
 * 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;
}

/* --------------------------------------------------------------------------
 * Shortcode copy notification (replaces inline styles in shortcode-notification.php)
 * -------------------------------------------------------------------------- */
#explorexr-copied-notification {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #2271b1;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 9999;
}

#explorexr-copied-notification p {
    margin: 0;
}

#explorexr-copied-notification .dashicons {
    margin-right: 8px;
}

/* --------------------------------------------------------------------------
 * Dashboard widget – orphaned models (replaces inline styles in model-cleanup.php)
 * -------------------------------------------------------------------------- */
.explorexr-dashboard-widget .spinner {
    float: none;
    margin-top: 0;
}

.explorexr-dashboard-widget .explorexr-success { color: #46b450; }
.explorexr-dashboard-widget .explorexr-warning  { color: #f56e28; }
.explorexr-dashboard-widget .explorexr-error    { color: #dc3232; }

/* --------------------------------------------------------------------------
 * Admin dashboard inline-style conversions (admin-ui.php)
 * -------------------------------------------------------------------------- */

/* Getting Started & Resources lists */
.explorexr-getting-started-list,
.explorexr-resources-list {
    margin: 0;
    padding-left: 20px;
}

.explorexr-getting-started-list li,
.explorexr-resources-list li {
    margin-bottom: 8px;
}

/* Stats icon colours */
.explorexr-stat-icon-star { color: #ffb900; }
.explorexr-stat-icon-ok   { color: #46b450; }

/* Status row (PHP version, upload size, etc.) */
.explorexr-status-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

/* Status value always OK (green, non-dynamic) */
.explorexr-status-ok { color: #46b450; }

/* Recent models list */
.explorexr-recent-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.explorexr-recent-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f1;
}

.explorexr-recent-date { color: #646970; }

/* How-to-use card */
.explorexr-how-to-intro { margin-bottom: 15px; }

.explorexr-code-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.explorexr-code-inline {
    background: #ffffff;
    padding: 5px;
    border-radius: 3px;
    font-size: 14px;
}

.explorexr-help-text {
    margin: 0;
    color: #646970;
    font-size: 13px;
}

/* Section header gap above featured models */
.explorexr-section-header-gap {
    margin-top: 40px;
    margin-bottom: 20px;
}

/* Empty-state icon in model cards */
.explorexr-empty-icon {
    font-size: 48px;
    opacity: 0.3;
}

/* Viewer controls card auto-rotate sub-group indent */
.explorexr-form-group-indent {
    margin-top: 15px;
    margin-left: 20px;
}

.explorexr-form-group-indent + .explorexr-form-group-indent {
    margin-top: 0;
}
