.email-loader {
    background: rgba(255,255,255,0.7);
    position: fixed;
    top:0;
    left:0;
    right:0;
    bottom:0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
}
.d-giftcard-none {
    display: none !important;
}

/*
-----------------------------------------------------
 CARTE CADEAU PREVIEW ACCOUNT
-----------------------------------------------------
*/
.gc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    z-index: 9998;
}

.gc-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    max-width: 700px;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    z-index: 9999;
    box-shadow: 0px 10px 30px rgba(0,0,0,0.25);
    max-height: 80vh;
    overflow-y: auto;
}

.gc-modal .gc-close {
    position: absolute;
    top: 8px;
    right: 12px;
    border: none;
    background: transparent;
    font-size: 30px;
    cursor: pointer;
}

.gc-modal.fade-in,
.gc-overlay.fade-in {
    animation: fadeIn 0.20s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


/*
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                                                        HOOK DE PAGE PERSONNALISEE
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*/
/*
================================
   GLOBAL
================================
*/
.giftcard-custom-block input[type="radio"] {
    accent-color: #000000;
    transform: scale(1.5);
}
/*
================================
   CHOIX DU VISUEL
================================
*/
img.template_img_secondary {
    margin-bottom: 2vh;
}

.list_templates_flex {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

/* Chaque template adapte sa largeur au contenu */
.template-item {
    width: fit-content;
}

/* Le label est cliquable */
.label_giftcard {
    display: block;
    cursor: pointer;
    text-align: center;
}

/* Hide radio, but keep functional */
.template-item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* WRAPPER = padding extérieur NON inclus dans la border */
.label_wrapper {
    padding: 10px; /* extérieur */
}

/* BORDER sur la zone interne uniquement */
.label_giftcard_name {
    border: 1px solid #c4c4c4;
    padding: 12px 20px; /* padding interne */
    transition: all .2s ease;
    width: fit-content;
    margin: auto;
}

/* Sélection du template */
.template-item input[type="radio"]:checked ~ .label_wrapper .label_giftcard_name {
    border: 2px solid #000;
    font-weight: bold;
}

/* Cache l’input sans casser le checked */
.template-item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/*
================================
   CHOIX DU TARIF
================================
*/
input#gift_card_amount {
    width: fit-content;
}

/*
================================
   CHOIX DU DESTINATAIRE + OFFRE
================================
*/
.giftcard-buy-mode label.form-check-label,
.giftcard-send-mode label.form-check-label
{
    padding: 2%;
}

.giftcard-send-mode input#giftcard_send_email,
.giftcard-send-mode input#giftcard_print,
.giftcard-buy-mode input#giftcard_for_friend,
.giftcard-buy-mode input#giftcard_for_me
{
    position: unset;
    margin: unset;
}

button#add_to_cart_btn_gift_card {
    text-transform: unset;
    font-weight: 200;
    padding: 4%;
}



/* ================================
   FORM CONTROL SPACING
   ================================ */
.giftcard-custom-block h4 {
    margin-top: 25px;
    margin-bottom: 10px;
}

/* ================================
   FEEDBACK
   ================================ */
#giftcard-feedback {
    display: none;
    font-size: 14px;
}

/* Success */
#giftcard-feedback.alert-success {
    display: block;
    border-left: 4px solid #28a745;
}

/* Error */
#giftcard-feedback.alert-danger {
    display: block;
    border-left: 4px solid #dc3545;
}

/* ================================
   MODAL PREVIEW
   ================================ */
#giftcard-preview-content img {
    max-width: 100%;
    border-radius: 8px;
}


/* Styles MOBILE */

@media (max-width: 992px) {

    .list_templates_img.row {
        display: flex;
        flex-direction: column-reverse;
    }

    img#main_template_img {
        margin-bottom: 5%;
    }

    .all_templates_img {
        display: grid;
        grid-template-columns: 32% 32% 32%;
        gap: 2%;
    }
}
