/**
 * LifterLMS Pruning Style UX Improvements
 * CSS for improved field spacing and button styling
 */

/* Remove excessive margin from the Pruning_style field wrapper */
.llms-pruning-style-field {
    margin: 0 !important;
}

/* Add minimal spacing between individual checkbox/radio options */
.llms-pruning-style-field .llms-input-group > .llms-form-field.type-checkbox,
.llms-pruning-style-field .llms-input-group > .llms-form-field.type-radio {
    margin: 0.5rem 0 !important;
}

/* Remove margin from clear divs */
.llms-pruning-style-field .llms-input-group > .clear {
    margin: 0 !important;
    height: 0;
}

/* Style the show more/less button */
.llms-show-more-btn {
    display: block;
    width: 100%;
    margin: 1rem 0 0.5rem 0;
    padding: 0.5rem 1rem;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.llms-show-more-btn:hover {
    background-color: #e9e9e9;
    border-color: #ccc;
}

.llms-show-more-btn:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.llms-show-more-btn:active {
    background-color: #ddd;
}

/* Smooth transition for showing/hiding options */
.llms-pruning-style-field .llms-radio-hidden {
    transition: opacity 0.3s ease;
}

/* Ensure proper spacing within the field wrapper */
.llms-pruning-style-field {
    position: relative;
}

/* Flex layout for checkbox/radio alignment */
.llms-pruning-style-field .llms-input-group > .llms-form-field.type-checkbox,
.llms-pruning-style-field .llms-input-group > .llms-form-field.type-radio {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.llms-pruning-style-field .llms-input-group > .llms-form-field.type-checkbox label,
.llms-pruning-style-field .llms-input-group > .llms-form-field.type-radio label {
    margin: 0;
    cursor: pointer;
    font-size: 15px;
}

/* Custom styled checkboxes */
.llms-pruning-style-field .llms-input-group > .llms-form-field.type-checkbox input[type="checkbox"],
.llms-pruning-style-field .llms-input-group > .llms-form-field.type-radio input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}

/* Enhanced checkbox styling */
.llms-pruning-style-field .llms-input-group > .llms-form-field.type-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #fff;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.llms-pruning-style-field .llms-input-group > .llms-form-field.type-checkbox input[type="checkbox"]:hover {
    border-color: #9ca3af;
}

.llms-pruning-style-field .llms-input-group > .llms-form-field.type-checkbox input[type="checkbox"]:checked {
    background-color: #2563eb;
    border-color: #2563eb;
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}

.llms-pruning-style-field .llms-input-group > .llms-form-field.type-checkbox input[type="checkbox"]:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}
