/*
Theme Name: Beaver Builder Child Theme
Theme URI: http://www.wpbeaverbuilder.com
Version: 1.0
Description: An example child theme that can be used as a starting point for custom development.
Author: The Beaver Builder Team
Author URI: http://www.fastlinemedia.com
template: bb-theme
*/

/* Add your custom styles here... */

/* =============================================
   Image Choice Field - Full-Width Grid Styling
   ============================================= */

/* Make the grid use CSS Grid with 3 equal columns filling full width */
.gfield--type-image_choice .gfield_checkbox {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
    width: 100% !important;
}

/* Remove fixed width on tiles, card styling, and whitespace */
.gfield--type-image_choice .gchoice {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-inline-size: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 6px !important;
    padding: 0 !important;
    overflow: hidden;
    cursor: pointer;
    font-size: 0 !important;
    line-height: 0 !important;
}

/* Make the outer wrapper fill the full tile */
.gfield--type-image_choice .gfield-image-choice-wrapper-outer {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    line-height: 0 !important;
}

/* Make the image fill the full tile width */
.gfield--type-image_choice .gfield-choice-image-wrapper {
    display: block;
    width: 100%;
    line-height: 0;
}

.gfield--type-image_choice .gfield-choice-image {
    width: 100% !important;
    height: auto !important;
    display: block;
    border-radius: 6px;
    border: 3px solid transparent !important;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

/* Hide the inner wrapper (checkbox + label text below image) */
.gfield--type-image_choice .gfield-image-choice-wrapper-inner {
    display: none !important;
}

/* Red border on image when selected */
.gfield--type-image_choice .gchoice:has(.gfield-choice-input:checked) .gfield-choice-image {
    border: 3px solid #cc0000 !important;
    box-shadow: 0 0 0 2px #cc0000 !important;
    border-radius: 6px !important;
}

/* Hide any GF checkmark/selected state overlays */
.gfield--type-image_choice .gfield-image-choice-wrapper-outer::after,
.gfield--type-image_choice .gfield-image-choice-wrapper-outer::before,
.gfield--type-image_choice .gchoice::after,
.gfield--type-image_choice .gchoice::before {
    display: none !important;
}

/* Responsive: 2-column grid on devices 768px wide and smaller */
@media (max-width: 768px) {
    .gfield--type-image_choice .gfield_checkbox {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}