.allsi-media-control,
.allsi-media-preview img,
.allsi-media-placeholder,
.allsi-media-actions .elementor-button {
    box-sizing: border-box;
}
.allsi-media-control{
    border: 1px dashed #c3c4c7;
    padding: 12px;
    text-align: center;
}
.allsi-media-preview img{
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 10px;
}
.allsi-media-placeholder{
    color: #555;
    font-style: italic;
    margin-bottom: 10px;
}
.allsi-media-actions .elementor-button{
    margin: 0 5px;
}

/* ASI Modal styles */
.allsi-media-tab-content {
    width: 100%;
    height: 100%;
    min-height: 450px;
    overflow: auto;
}

.allsi-media-tab-content .allsi-inline-explorer {
    padding: 15px;
    background: #fff;
}

/* Fix tabs spacing in ASI explorer inside modal */
.allsi-media-tab-content .nav-tabs,
.allsi-media-tab-content .mpt-nav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.allsi-media-tab-content .nav-tabs .nav-link,
.allsi-media-tab-content .mpt-nav-tabs .nav-link,
.allsi-media-tab-content .nav-tabs a,
.allsi-media-tab-content .mpt-nav-tabs a {
    padding: 8px 16px;
    margin: 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f7f7f7;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s ease;
}

.allsi-media-tab-content .nav-tabs .nav-link:hover,
.allsi-media-tab-content .mpt-nav-tabs .nav-link:hover,
.allsi-media-tab-content .nav-tabs a:hover,
.allsi-media-tab-content .mpt-nav-tabs a:hover {
    background: #e5e5e5;
    border-color: #ccc;
}

.allsi-media-tab-content .nav-tabs .nav-link.active,
.allsi-media-tab-content .mpt-nav-tabs .nav-link.active,
.allsi-media-tab-content .nav-tabs a.active,
.allsi-media-tab-content .mpt-nav-tabs a.active {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

/* Search input inside modal */
.allsi-media-tab-content input[type="text"],
.allsi-media-tab-content input[type="search"] {
    width: 100%;
    max-width: 400px;
    padding: 10px 15px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Image grid in modal */
.allsi-media-tab-content .mpt-images-grid,
.allsi-media-tab-content .images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    padding: 10px 0;
}

.allsi-media-tab-content .mpt-images-grid img,
.allsi-media-tab-content .images-grid img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.allsi-media-tab-content .mpt-images-grid img:hover,
.allsi-media-tab-content .images-grid img:hover {
    border-color: #0073aa;
    transform: scale(1.02);
}

/* Buttons in modal */
.allsi-media-tab-content .btn,
.allsi-media-tab-content button {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.allsi-media-tab-content .btn-primary {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

.allsi-media-tab-content .btn-primary:hover {
    background: #005a87;
    border-color: #005a87;
}

/* =============================================
   Custom Bank Picker - Checkbox Styles for Elementor/Media Modal
   ============================================= */

.allsi-custom-bank-picker {
    box-sizing: border-box;
}

.allsi-custom-bank-picker *,
.allsi-custom-bank-picker *::before,
.allsi-custom-bank-picker *::after {
    box-sizing: border-box;
}

/* Grid container for checkboxes */
.allsi-custom-bank-picker > div {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 4px !important;
}

/* Base control wrapper - this gets the padding */
.allsi-custom-bank-picker .components-base-control {
    margin: 0 !important;
    padding: 6px 10px !important;
    border-radius: 4px !important;
    transition: background 0.15s ease !important;
}

.allsi-custom-bank-picker .components-base-control:hover {
    background: rgba(0, 0, 0, 0.03) !important;
}

.allsi-custom-bank-picker .components-base-control__field {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* The main label element - only left padding */
.allsi-custom-bank-picker .components-checkbox-control__label {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    padding-left: 8px !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    width: 100% !important;
}

/* Input container that holds the checkbox */
.allsi-custom-bank-picker .components-checkbox-control__input-container {
    display: inline-block !important;
    flex-shrink: 0 !important;
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
}

/* Hide the default WP checkbox SVG icon */
.allsi-custom-bank-picker .components-checkbox-control__input-container svg {
    display: none !important;
}

/* The actual checkbox input */
.allsi-custom-bank-picker .components-checkbox-control__input-container input[type="checkbox"],
.allsi-custom-bank-picker input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #8c8f94 !important;
    border-radius: 2px !important;
    background: #fff !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

.allsi-custom-bank-picker input[type="checkbox"]:checked {
    background: #2271b1 !important;
    border-color: #2271b1 !important;
}

.allsi-custom-bank-picker input[type="checkbox"]:checked::before {
    content: '' !important;
    position: absolute !important;
    top: 1px !important;
    left: 4px !important;
    width: 5px !important;
    height: 9px !important;
    border: solid #fff !important;
    border-width: 0 2px 2px 0 !important;
    transform: rotate(45deg) !important;
    display: block !important;
}

.allsi-custom-bank-picker input[type="checkbox"]:focus {
    outline: 2px solid #2271b1 !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
}

/* Label text span */
.allsi-custom-bank-picker .components-checkbox-control__label > span:last-child {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #1e1e1e !important;
    line-height: 16px !important;
}
