/**
 * ExploreXR Materials Variants Custom Control Styles
 * 
 * CSS for custom materials variant controls displayed outside the model viewer
 * 
 * @package ExploreXR_Materials_Addon
 * @version 1.0.0
 */

/* ===== Custom Material Variants Control Base Styles ===== */
.explorexr-premium-material-variants-control {
    margin: 15px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.explorexr-premium-material-variants-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 500;
}

/* ===== Button Style ===== */
.explorexr-premium-material-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.explorexr-premium-material-button {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
}

.explorexr-premium-material-button:hover {
    background: #eaeaea;
    border-color: #ccc;
}

.explorexr-premium-material-button.explorexr-premium-active {
    background: #0073aa;
    color: white;
    border-color: #005a87;
}

.explorexr-premium-material-button.explorexr-premium-active:hover {
    background: #005a87;
}

/* ===== Dropdown Style ===== */
.explorexr-premium-material-dropdown-wrapper {
    position: relative;
    max-width: 100%;
}

.explorexr-premium-material-dropdown {
    width: 100%;
    max-width: 300px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="6" viewBox="0 0 12 6"><path fill="%23666" d="M0 0h12L6 6z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.explorexr-premium-material-dropdown:hover {
    border-color: #b4b4b4;
}

.explorexr-premium-material-dropdown:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.25);
}

/* ===== List Style ===== */
.explorexr-premium-material-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.explorexr-premium-material-item {
    margin: 0;
    border-bottom: 1px solid #ddd;
}

.explorexr-premium-material-item:last-child {
    border-bottom: none;
}

.explorexr-premium-material-link {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
}

.explorexr-premium-material-link:hover {
    background-color: #f5f5f5;
    text-decoration: none;
}

.explorexr-premium-material-item.explorexr-premium-active .explorexr-premium-material-link {
    background-color: #0073aa;
    color: white;
}

.explorexr-premium-material-item.explorexr-premium-active .explorexr-premium-material-link:hover {
    background-color: #005a87;
}

/* ===== Responsive Design ===== */
@media (max-width: 480px) {
    .explorexr-premium-material-variants-control {
        font-size: 13px;
    }
    
    .explorexr-premium-material-button {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .explorexr-premium-material-dropdown {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .explorexr-premium-material-link {
        padding: 8px 12px;
    }
}

/* ===== Dark Theme Support ===== */
@media (prefers-color-scheme: dark) {
    .explorexr-premium-material-variants-control {
        color: #e0e0e0;
    }
    
    .explorexr-premium-material-button {
        background: #333;
        border-color: #555;
        color: #e0e0e0;
    }
    
    .explorexr-premium-material-button:hover {
        background: #444;
        border-color: #666;
    }
    
    .explorexr-premium-material-dropdown {
        background: #333;
        border-color: #555;
        color: #e0e0e0;
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="6" viewBox="0 0 12 6"><path fill="%23aaa" d="M0 0h12L6 6z"/></svg>');
    }
    
    .explorexr-premium-material-list {
        border-color: #555;
    }
    
    .explorexr-premium-material-item {
        border-bottom-color: #555;
    }
    
    .explorexr-premium-material-link {
        color: #e0e0e0;
    }
    
    .explorexr-premium-material-link:hover {
        background-color: #444;
    }
}

/* ===== Accessibility ===== */
.explorexr-premium-material-button:focus,
.explorexr-premium-material-dropdown:focus,
.explorexr-premium-material-link:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}
