/*
 * 'ep_radio_cards' settings field (WC_Easyparcel_Shipping_Method::generate_ep_radio_cards_html).
 * Loaded only on WooCommerce > Settings > Shipping > EasyParcel.
 */
.ep-radio-cards {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 625px;
    margin: 0;
    padding: 0;
    border: 0;
}

/* !important: WP core's `.form-table td fieldset label` sets margin .35em 0 .5em
   !important, which would add ~11px between cards on top of the fieldset gap. */
.ep-radio-cards .ep-radio-cards__card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 !important;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.ep-radio-cards .ep-radio-cards__card:hover {
    border-color: #a7aaad;
}

.ep-radio-cards .ep-radio-cards__card:has(.ep-radio-cards__input:checked) {
    background: #f6f9fc;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.ep-radio-cards .ep-radio-cards__card:has(.ep-radio-cards__input:focus-visible) {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.ep-radio-cards .ep-radio-cards__card:has(.ep-radio-cards__input:disabled) {
    cursor: not-allowed;
    opacity: .6;
}

/* WP admin radios are 16px; 2px down centres them on the 20px label line. */
.ep-radio-cards .ep-radio-cards__input {
    flex-shrink: 0;
    margin: 2px 0 0;
}

/* The card draws the focus ring, so the radio's own one would double it. */
.ep-radio-cards .ep-radio-cards__input:focus {
    box-shadow: none;
    outline: none;
}

.ep-radio-cards .ep-radio-cards__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}

.ep-radio-cards .ep-radio-cards__label {
    font-size: 13px;
    font-weight: 600;
    line-height: 20px;
    color: #1d2327;
}

.ep-radio-cards .ep-radio-cards__description {
    font-size: 12px;
    line-height: 18px;
    color: #50575e;
}

.ep-radio-cards .ep-radio-cards__warning {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    padding: 3px 8px;
    font-size: 11px;
    line-height: 16px;
    color: #614a19;
    background: #fcf9e8;
    border: 1px solid #f0d98c;
    border-radius: 3px;
}

.ep-radio-cards .ep-radio-cards__warning .dashicons {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    font-size: 14px;
}
