/* ── Escale Nature — Bons Cadeaux — Front CSS ── */

/* ── Bloc champs cadeau ── */
.enbc-gift-fields { margin: 0px 0; }
.enbc-gift-fields-inner {
    border: 1px solid rgba(18,34,49,0.1);
    padding: 24px;
    background: #FDFBF8;
}
.enbc-gift-fields-title {
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #122231;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}
.enbc-gift-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}
.enbc-gift-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}
.enbc-gift-field:last-child { margin-bottom: 0; }
.enbc-gift-field label {
    font-size: 14px;
    font-weight: 500;
    color: #122231;
    letter-spacing: 0.04em;
}
.enbc-gift-field label span {
    font-weight: 300;
    color: #7a8c98;
}
.enbc-gift-field input[type="text"],
.enbc-gift-field textarea {
    border: 1px solid rgba(18,34,49,0.15) !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    font-family: inherit !important;
    background: #fff !important;
    border-radius: 2px !important;
    transition: border-color 0.2s !important;
    width: 100% !important;
    box-shadow: none !important;
}
.enbc-gift-field input[type="text"]:focus,
.enbc-gift-field textarea:focus {
    outline: none !important;
    border-color: #D7C1A9 !important;
}

/* ── Choix livraison ── */
.enbc-livraison-choice { margin-top: 4px; }
.enbc-livraison-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.enbc-livraison-option {
    cursor: pointer;
}
.enbc-livraison-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.enbc-livraison-option-inner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid rgba(18,34,49,0.12);
    padding: 12px 14px;
    border-radius: 2px;
    background: #fff;
    transition: all 0.2s;
    cursor: pointer;
}
.enbc-livraison-option-inner svg {
    flex-shrink: 0;
    color: #D7C1A9;
    margin-top: 2px;
}
.enbc-livraison-option-inner > span {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.enbc-livraison-option-inner strong {
    font-size: 14px;
    font-weight: 500;
    color: #122231;
    letter-spacing: 0.02em;
}
.enbc-livraison-option-inner em {
    font-size: 13px;
    font-style: normal;
    color: #7a8c98;
    line-height: 1.4;
}
.enbc-livraison-option--active .enbc-livraison-option-inner,
.enbc-livraison-option input:checked ~ .enbc-livraison-option-inner {
    border-color: #122231;
    background: #122231;
}
.enbc-livraison-option--active .enbc-livraison-option-inner strong,
.enbc-livraison-option input:checked ~ .enbc-livraison-option-inner strong {
    color: #E9E1CE;
}
.enbc-livraison-option--active .enbc-livraison-option-inner em,
.enbc-livraison-option input:checked ~ .enbc-livraison-option-inner em {
    color: rgba(215,193,169,0.7);
}
.enbc-livraison-option--active .enbc-livraison-option-inner svg,
.enbc-livraison-option input:checked ~ .enbc-livraison-option-inner svg {
    color: #D7C1A9;
}

/* ── Bouton prévisualisation ── */
.enbc-preview-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 16px;
    padding: 10px 18px;
    background: transparent;
    border: 1px solid rgba(18,34,49,0.2);
    color: #122231;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.2s;
    font-family: inherit;
}
.enbc-preview-btn:hover {
    background: #122231;
    color: #E9E1CE;
    border-color: #122231;
}
.enbc-preview-btn svg { flex-shrink: 0; }

/* ── Modal ── */
.enbc-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.enbc-modal[hidden] { display: none !important; }

.enbc-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18,34,49,0.7);
    backdrop-filter: blur(4px);
}
.enbc-modal-inner {
    position: relative;
    z-index: 1;
    background: #fff;
    width: 100%;
    max-width: 639px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(18,34,49,0.3);
}
.enbc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(18,34,49,0.08);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 500;
    color: #122231;
    flex-shrink: 0;
}
.enbc-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #7a8c98;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.enbc-modal-close:hover { color: #122231; }

#enbc-preview-modal .enbc-modal-body {
    flex: 1;
    overflow: auto;
    padding: 40px;
    background: #eae3dd;
}
.enbc-modal-loading {
    padding: 40px;
    text-align: center;
    color: #7a8c98;
    font-size: 13px;
}

/* iframe de prévisualisation */
.enbc-preview-iframe {
    width: 100%;
    border: none;
    display: block;
    /* ratio A5 : 148mm x 210mm ≈ 0.705 */
    /* aspect-ratio: 148 / 210; */
    min-height: 397px;
    box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
}

.enbc-modal-note {
    font-size: 11px;
    color: #7a8c98;
    padding: 10px 20px 14px;
    line-height: 1.6;
    border-top: 1px solid rgba(18,34,49,0.06);
    flex-shrink: 0;
    background: #FDFBF8;
}

/* Responsive */
@media (max-width: 600px) {
    .enbc-gift-row,
    .enbc-livraison-options { grid-template-columns: 1fr; }
    .enbc-modal-inner { max-width: 100%; max-height: 95vh; }
}

/* ── Selects chaînés prestation ───────────────────────────────────── */
.enbc-prestation-selects {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.enbc-select-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.enbc-select-label {
    font-size: 14px;
    font-weight: 500;
    color: #122231;
    letter-spacing: 0.04em;
}
.enbc-cat-select,
.enbc-prest-select {
    width: 100%;
    padding: 10px 32px 10px 14px;
    border: 1px solid rgba(18,34,49,0.15);
    border-radius: 2px;
    font-size: 14px;
    font-family: inherit;
    color: #122231;
    background: #fff url("data:image/svg+xml,%3Csvg width='8' height='5' viewBox='0 0 8 5' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l3 3 3-3' stroke='%23122231' stroke-width='1'/%3E%3C/svg%3E") no-repeat right 12px center;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.2s;
}
.enbc-cat-select:focus,
.enbc-prest-select:focus {
    outline: none;
    border-color: #D7C1A9;
}
.enbc-prest-select:disabled {
    opacity: 0.5;
    cursor: default;
}

/* ── Dropdown custom prestation ───────────────────────────────────────────── */
.enbc-dropdown-wrap {
    position: relative;
    width: 100%;
    margin-bottom: 16px;
}

.enbc-dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 11px 14px;
    border: 1px solid rgba(18,34,49,0.15);
    border-radius: 2px;
    background: #fff;
    cursor: pointer;
    font-family: var(--uicore-text-font-family);
    font-size: 14px;
    color: var(--uicore-headline-color);
    transition: border-color 0.2s;
    user-select: none;
}
.enbc-dropdown-trigger:hover,
.enbc-dropdown-trigger.is-open {
    border-color: var(--uicore-secondary-color, #D7C1A9);
}
.enbc-dropdown-trigger svg {
    flex-shrink: 0;
    color: var(--uicore-body-color);
    transition: transform 0.2s;
}
.enbc-dropdown-trigger.is-open svg {
    transform: rotate(180deg);
}
.enbc-dropdown-value {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Panel — position absolute dans le flow normal */
.enbc-dropdown-panel {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid rgba(18,34,49,0.15);
    border-radius: 2px;
    box-shadow: 0 8px 24px rgba(18,34,49,0.12);
    z-index: 9999;
    overflow: hidden;
}

.enbc-dropdown-search-wrap {
    padding: 10px 10px 8px;
    border-bottom: 1px solid rgba(18,34,49,0.08);
}
.enbc-dropdown-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(18,34,49,0.15) !important;
    border-radius: 2px !important;
    font-family: var(--uicore-text-font-family) !important;
    font-size: 13px !important;
    color: var(--uicore-headline-color) !important;
    background: #fff !important;
    outline: none !important;
    box-shadow: none !important;
}
.enbc-dropdown-search:focus {
    border-color: var(--uicore-secondary-color, #D7C1A9) !important;
}

.enbc-dropdown-list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
    max-height: 260px;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.enbc-dropdown-item {
    padding: 8px 14px;
    font-size: 13px;
    font-family: var(--uicore-text-font-family);
    color: var(--uicore-headline-color);
    cursor: pointer;
    line-height: 1.4;
    transition: background 0.1s;
}
.enbc-dropdown-item:hover,
.enbc-dropdown-item:focus {
    background: rgba(18,34,49,0.05);
    outline: none;
}
.enbc-dropdown-item.is-selected {
    background: rgba(215,193,169,0.2);
    font-weight: 500;
}
.enbc-dropdown-empty {
    padding: 12px 14px;
    font-size: 13px;
    color: var(--uicore-body-color);
    font-style: italic;
}

/* Scrollbar discrète */
.enbc-dropdown-list::-webkit-scrollbar {
    width: 4px;
}
.enbc-dropdown-list::-webkit-scrollbar-track {
    background: transparent;
}
.enbc-dropdown-list::-webkit-scrollbar-thumb {
    background: rgba(18,34,49,0.15);
    border-radius: 2px;
}

.enbc-dropdown-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.enbc-item-label { flex: 1; }
.enbc-item-price {
    color: #888;
    white-space: nowrap;
    font-size: .9em;
}