/**
 * Material Picker Styles
 */
.bform-material-picker {
    margin-bottom: 20px;
}

.bform-materials-grid {
    display: grid;
    gap: 20px;
    margin-top: 15px;
    justify-items: center;
}

.bform-materials-empty {
    padding: 40px 20px;
    text-align: center;
    background: #f5f5f5;
    border: 2px dashed #ddd;
    border-radius: 8px;
    color: #666;
}

.bform-material-item {
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 300px;
}

.bform-material-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.bform-material-visual {
    position: relative;
    width: 100%;
    min-width: 200px;
    max-width: 300px;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: border-color 0.2s, transform 0.2s;
}

.bform-material-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 200px;
}

.bform-material-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: #0073aa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.2s, transform 0.2s;
}

.bform-material-item:hover .bform-material-visual {
    border-color: #ddd;
    transform: translateY(-2px);
}

.bform-material-input:checked + .bform-material-visual {
    border-color: #0073aa;
}

.bform-material-input:checked + .bform-material-visual .bform-material-check {
    opacity: 1;
    transform: scale(1);
}

.bform-material-title {
    margin-top: 8px;
    font-size: 13px;
    text-align: center;
    color: #333;
    font-weight: 500;
}

/* Editor styles */
.editor-styles-wrapper .bform-material-item {
    pointer-events: none;
}

.editor-styles-wrapper .bform-materials-grid {
    opacity: 0.8;
}
