/*============================================*\
#    Export de resultats de recherche    #
\*============================================*/

/* @changelog 2026-03-10 [EVOL] (Fabie <f.lalaonantenaina@medialibs.com>) Ajout du sélecteur .ressources-grid pour le positionnement des checkboxes sur les cartes ressources */

.card-search-result .bgc-white {
    position: relative !important;
}

.contentResultSearch [id^="post-"],
.ressources-grid [id^="post-"] {
    position: relative !important;
}

.searchResultat .d-none {
    display: none !important;
}

.export-selection {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    z-index: 10 !important;
    opacity: 1;
    transition: opacity 0.2s ease;
    pointer-events: auto;
}

.card-search-result:hover .export-selection {
    opacity: 1;
}

.export-checkbox {
    opacity: 0;
    position: absolute;
    width: 24px;
    height: 24px;
    margin: 0;
    cursor: pointer;
    z-index: 1;
}

.export-checkbox-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--couleur-orange);
    border-radius: 4px;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.export-checkbox-label:hover {
    background: rgba(255, 255, 255, 1);
    border-color: var(--couleur-orange);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.export-checkbox:checked+.export-checkbox-label {
    background: var(--couleur-orange);
    border-color: var(--couleur-orange);
}

.export-checkbox:checked+.export-checkbox-label .checkmark {
    display: block;
    color: white;
}

.checkmark {
    display: none;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.export-controls {
    gap: 10px;
    align-self: flex-start;
    padding-top: 15px;
    padding-bottom: 15px;
    padding-right: 15px;
    display: flex;
    flex-wrap: /*no*/wrap;
    align-items: center;
}

.select-all-container,
.select-all-pages-container {
    white-space: nowrap;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.select-all-label {
    font-size: 14px;
    color: #333;
    user-select: none;
    line-height: 1;
    display: flex;
    align-items: center;
}

.select-all-checkbox {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    cursor: pointer;
    flex-shrink: 0;
}

.export-btn {
    --form-bouton-fondColor: var(--couleur-orange);
    --form-bouton-textColor: var(--couleur-blanc);
    display: flex;
    align-items: center;
    gap: 0.3em;
    text-decoration: none;
}

.export-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.export-btn i {
    font-size: 1em;
}

.select-all-pages-container input[data-all-pages-selected="true"]+label {
    background: #28a745 !important;
    border-color: #28a745 !important;
    color: white !important;
}

.select-all-pages-container input[data-all-pages-selected="true"]+label:before {
    content: "✓ ";
    font-weight: bold;
}