/**
 * Parenthese Ceramique Gift Cards - Blocs Panier / Checkout
 * Complète les styles natifs des blocs WooCommerce (wc-block-components-*).
 */

.pgc-blocks-panel .pgc-blocks-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
}

.pgc-blocks-panel .pgc-blocks-form .wc-block-components-text-input {
    flex: 1 1 12em;
    min-width: 0;
    margin: 0;
}

.pgc-blocks-panel .pgc-blocks-apply {
    flex: 0 0 auto;
    min-height: 3em;
}

.pgc-blocks-panel .pgc-blocks-cards {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
}

.pgc-blocks-panel .pgc-blocks-cards > li {
    list-style: none;
}

.pgc-blocks-panel .pgc-blocks-cards > li::marker {
    content: none;
}

.pgc-blocks-card {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px 0;
    border-bottom: 1px solid rgba(128, 128, 128, 0.25);
}

.pgc-blocks-card:last-child {
    border-bottom: 0;
}

.pgc-blocks-card__code {
    flex: 1;
    min-width: 0;
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    letter-spacing: 1px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.pgc-blocks-card__amount {
    font-weight: 600;
    white-space: nowrap;
}

.pgc-blocks-panel .pgc-blocks-card .pgc-blocks-card__remove {
    flex: 0 0 auto;
    min-width: 0;
    min-height: 0;
    margin: 0;
    box-shadow: none;
    text-shadow: none;
    text-transform: none;
    letter-spacing: normal;
    width: 2.25em;
    height: 2.25em;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    font-size: 1.25em;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
}

.pgc-blocks-panel .pgc-blocks-card .pgc-blocks-card__remove:hover,
.pgc-blocks-panel .pgc-blocks-card .pgc-blocks-card__remove:focus,
.pgc-blocks-panel .pgc-blocks-card .pgc-blocks-card__remove:focus-visible {
    opacity: 1;
    border: 0;
    color: inherit;
    background: rgba(128, 128, 128, 0.15);
    box-shadow: none;
}

/* Navigation au clavier : un indicateur de focus net (le fond translucide seul est trop discret). */
.pgc-blocks-panel .pgc-blocks-card .pgc-blocks-card__remove:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.pgc-blocks-panel .pgc-blocks-card .pgc-blocks-card__remove:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

.pgc-blocks-covered {
    margin: 0;
    font-size: 0.9em;
}

/* Minimum de paiement par carte bancaire : explication sous la liste des cartes. */
.pgc-blocks-note {
    margin: 8px 0 0;
    font-size: 0.85em;
    opacity: 0.85;
}

.pgc-blocks-error {
    margin-top: 8px;
}

@media (pointer: coarse) {
    .pgc-blocks-panel .pgc-blocks-card .pgc-blocks-card__remove {
        width: 44px;
        height: 44px;
    }

    /* Bouton d'ouverture du panneau (fourni par WooCommerce, haut de 24 px dans les versions anciennes) : cible tactile de 44 px. */
    .pgc-blocks-panel .wc-block-components-panel__button {
        min-height: 44px;
    }
}
