/**
 * Edit Model Page CSS
 * 
 * Page-specific styles for the Edit Model admin page
 * Shared components are in components.css
 * 
 * @package ExploreXR
 * @since 1.0.8
 */

/* WordPress admin compatibility fixes - Only apply minimal necessary changes */

/* Ensure proper scroll behavior without breaking admin menu */
body.wp-admin {
    height: auto !important;
}

/* Don't override WordPress admin menu positioning - this breaks hover functionality */
/* Removed: #adminmenuwrap position and z-index overrides */

/* Ensure content area doesn't conflict with admin layout */
#wpcontent {
    height: auto !important;
    min-height: 100%;
}

/* Only apply admin bar fixes when needed */
@media screen and (max-width: 782px) {
    .explorexr-admin-menu-fix {
        padding-top: 46px; /* WordPress admin bar height on mobile */
    }
}

.explorexr-admin-page {    
    margin: 20px 20px 0 0;
}

.explorexr-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.explorexr-page-title h1 {
    margin-bottom: 5px;
}

.explorexr-page-subtitle {
    color: #646970;
    font-size: 14px;
}

.explorexr-preview-card {
    margin-bottom: 30px;
}

.explorexr-model-shortcode {
    display: flex;
    align-items: center;
    gap: 5px;
}

.explorexr-model-shortcode code {
    padding: 4px 8px;
    background: #E4E9EC;
    border-radius: 4px;
}

/* Card styles - inheriting from admin-styles.css */
/* .explorexr-card base styles are defined in admin-styles.css */

.explorexr-card-note {
    background-color: #f0f6fc;
    border-left: 4px solid #72aee6;
    padding: 12px;
    margin-bottom: 20px;
}

/* Form grid and groups - shared styles moved to components.css */

.explorexr-empty-preview {
    height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 4px;
    color: #646970;
}

.explorexr-empty-preview .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Tabs, device tabs, and size options - shared styles moved to components.css */

.explorexr-current-model {
    margin-bottom: 20px;
    padding: 15px;
    background: #f0f7fc;
    border-radius: 0;
    border-left: 4px solid #2AACE2;
}

.explorexr-current-model h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 14px;
    color: #1d2327;
    font-weight: 600;
}

.explorexr-model-file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-weight: 500;
}

.explorexr-model-file-path {
    margin-left: 34px;
    padding: 8px;
    background: #E4E9EC;
    border-radius: 4px;
    font-size: 13px;
    overflow-x: auto;
    border: 1px solid #e2e4e7;
}

.explorexr-current-poster {
    margin-bottom: 20px;
}

.explorexr-current-poster h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 14px;
    color: #1d2327;
    font-weight: 600;
}

.explorexr-remove-poster {
    margin-top: 10px;
}

/* Input groups and checkbox groups - shared styles moved to components.css */

.explorexr-form-actions {
    margin-top: 30px;
    display: flex;
    gap: 10px;
}

/* Button styles */
.explorexr-action-button,
.explorexr-primary-button,
.explorexr-secondary-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Button styles - inheriting base button styles from admin-styles.css */
/* .button-primary and .button-secondary are defined in admin-styles.css */

.explorexr-primary-button {
    background-color: #2AACE2;
    color: #fff;
    border: 1px solid #2AACE2;
}

.explorexr-primary-button:hover {
    background-color: #1e8bb8;
    color: #fff;
    border-color: #1e8bb8;
}

.explorexr-secondary-button,
.button {
    background-color: #0D152C;
    color: #2c3338;
    border: 1px solid #c3c4c7;
}

.explorexr-secondary-button:hover,
.button:hover {
    background-color: #e2e4e7;
    color: #1d2327;
}

span.required {
    color: #d63638;
}

/* Optional span and poster styles - shared styles moved to components.css */

/* Alert styles aligned with admin-style.css */
.explorexr-alert {
    display: flex;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 0;
    align-items: flex-start;
    line-height: 1.5;
    border-left: 4px solid;
}

.explorexr-alert.success {
    background-color: #d4edda;
    border-color: #00a32a;
    color: #155724;
}

.explorexr-alert.info {
    background-color: #d1ecf1;
    border-color: #72aee6;
    color: #0c5460;
}

.explorexr-alert.warning {
    background-color: #fff3cd;
    border-color: #ffb900;
    color: #856404;
}

.explorexr-alert.error {
    background-color: #f8d7da;
    border-color: #d63638;
    color: #721c24;
}

.explorexr-alert .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    margin-right: 15px;
}

.explorexr-alert.success .dashicons {
    color: #00a32a;
}

.explorexr-alert.error .dashicons {
    color: #d63638;
}

.copy-shortcode {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    background: #E4E9EC;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-shortcode:hover {
    background: #e2e4e7;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Additional button icon styles */
.explorexr-action-button .dashicons,
.explorexr-primary-button .dashicons,
.explorexr-secondary-button .dashicons,
.button .dashicons {
    margin-right: 5px;
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: inherit;
}

/* Empty preview styling */
.explorexr-empty-preview {
    height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f6f7f7;
    border-radius: 0;
    color: #646970;
}

.explorexr-empty-preview .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
    color: #2AACE2;
}

/* Model viewer styling */
.explorexr-model-preview {
    width: 100%; 
    height: 400px; 
    background-color: #f6f7f7; 
    border-radius: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

/* Full width form groups */
.explorexr-full-width {
    grid-column: 1 / -1;
}

/* Poster preview and thumbnail styles - shared styles moved to components.css */

/* Edit Model Notifications */
.explorexr-edit-notification {
    position: fixed;
    top: 60px;
    right: 20px;
    z-index: 99999;
    min-width: 300px;
    max-width: 500px;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    animation: slideInRight 0.3s ease-out;
}

.explorexr-edit-notification.success {
    border-left: 4px solid #00a32a;
    background: #f0f9f0;
}

.explorexr-edit-notification.error {
    border-left: 4px solid #d63638;
    background: #fdf0f0;
}

.explorexr-edit-notification.info {
    border-left: 4px solid #0073aa;
    background: #f0f9ff;
}

.explorexr-edit-notification .notification-message {
    font-size: 14px;
    line-height: 1.4;
}

.explorexr-edit-notification .notification-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #646970;
    padding: 0;
    margin-left: 10px;
    line-height: 1;
}

.explorexr-edit-notification .notification-close:hover {
    color: #d63638;
}

/* Responsive settings */
@media (max-width: 782px) {
    .explorexr-form-grid {
        grid-template-columns: 1fr;
    }
    
    .explorexr-page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .explorexr-page-actions {
        margin-top: 15px;
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .explorexr-page-actions a,
    .explorexr-page-actions button {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .explorexr-form-actions {
        flex-direction: column;
    }
    
    .explorexr-form-actions button,
    .explorexr-form-actions a {
        width: 100%;
        justify-content: center;
    }
    
    .explorexr-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .explorexr-model-shortcode {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .explorexr-model-shortcode code {
        width: 100%;
        box-sizing: border-box;
        overflow-x: auto;
    }
    
    .copy-shortcode {
        width: 100%;
        justify-content: center;
    }
}

/* Bug Fix #3: Hide upload sections initially until user clicks the tab */
#upload-model:not(.active),
#existing-model:not(.active),
#upload-poster:not(.active) {
    display: none;
}

/* Device content visibility - shared styles in components.css */
