/* ZRExpress Checkout Styles */

#zrexpress-rates-container,
#zrexpress-hubs-container {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin: 16px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#zrexpress-rates-container h4,
#zrexpress-hubs-container h4 {
    margin: 0 0 16px 0;
    color: #111827;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 12px;
}

.zrexpress-option-wrapper {
    position: relative;
    margin-bottom: 12px;
}

.zrexpress-option-wrapper:last-child {
    margin-bottom: 0;
}

.zrexpress-rate-label {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px !important;
    margin: 0 !important;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    background-color: #f9fafb;
    font-size: 15px !important;
    color: #374151;
}

.zrexpress-rate-label:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

.zrexpress-rate-option {
    margin: 0 12px 0 0 !important;
    width: 18px;
    height: 18px;
    accent-color: #0ea5e9; /* Used in modern browsers to color radio */
}

/* When radio is checked, style the label — applies to both delivery type and hub options */
.zrexpress-rate-option:checked + .zrexpress-rate-label,
.zrexpress-hub-option:checked + .zrexpress-rate-label {
    background-color: #f0f9ff;
    border-color: #0ea5e9;
    color: #0c4a6e;
    box-shadow: 0 0 0 1px #0ea5e9;
}

/* Make the price bold and right aligned */
.zrexpress-price-tag {
    font-weight: 600;
    color: #0f172a;
    background: #e2e8f0;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 14px;
}

.zrexpress-rate-option:checked + .zrexpress-rate-label .zrexpress-price-tag,
.zrexpress-hub-option:checked + .zrexpress-rate-label .zrexpress-price-tag {
    background: #bae6fd;
    color: #0369a1;
}

.zrexpress-error {
    color: #ef4444;
    font-size: 14px;
    padding: 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Make sure fields have proper spacing and clearing for columns */
.zrexpress-wilaya-field {
    margin-bottom: 16px;
    clear: left;
}

.zrexpress-commune-field {
    margin-bottom: 16px;
}
