/* ==============================================
   MAIN CONTAINER
   ============================================== */

#wcasr-shipping-groups-container {
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    background: #f6f7f7;
    overflow: hidden;
    max-width: 900px;
}

#wcasr-shipping-groups-wrapper {
    padding: 16px 16px 8px;
}

/* ==============================================
   GROUP CARD
   ============================================== */

.wcasr-shipping-group {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

/* ==============================================
   GROUP HEADER
   ============================================== */

.wcasr-shipping-group__header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 6px 10px;
    background: #f0f0f1;
    border-bottom: 1px solid #dcdcde;
}

.wcasr-shipping-group__header .wcasr-shipping-remove-group.components-button {
    font-size: 12px;
    padding: 2px 8px;
    height: auto;
    line-height: 1.7;
    min-height: 0;
}

/* ==============================================
   CONDITIONS AREA (body)
   ============================================== */

.wcasr-conditions-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
}

.wcasr-condition {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 3px;
    width: auto;
}

.wcasr-condition select,
.wcasr-condition input[type="number"] {
    font-size: 13px;
}

/* Override WooCommerce table-wide input rules */
.woocommerce table.form-table .wcasr-conditions-container select,
.woocommerce table.form-table .wcasr-conditions-container input[type="number"] {
    width: auto;
    flex: 1;
    min-width: 80px;
    line-height: normal;
    padding: 5px 8px;
}

.wcasr-conditions-container input::placeholder {
    opacity: 0.45;
}

/* Remove condition (×) icon button */
.wcasr-condition .remove-condition.components-button {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    color: #a7aaad;
    border-radius: 50%;
    border: 1px solid transparent;
}

.wcasr-condition .remove-condition.components-button:hover {
    color: #d63638;
    background: #fce8e8;
    border-color: #d63638;
}

/* ==============================================
   GROUP FOOTER
   ============================================== */

.wcasr-shipping-group__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    background: #f0f0f1;
    border-top: 1px solid #dcdcde;
    gap: 12px;
    flex-wrap: wrap;
}

/* Add condition button */
.wcasr-shipping-group__footer .wcasr-shipping-add-condition.components-button {
    font-size: 12px;
    padding: 4px 10px;
    height: auto;
    line-height: 1.7;
    min-height: 0;
}

/* Cost field */
.wcasr-group-cost-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.wcasr-group-cost-label {
    font-size: 12px;
    font-weight: 600;
    color: #3c434a;
    white-space: nowrap;
}

.woocommerce table.form-table .wcasr-shipping-group__footer input.group-cost {
    width: 110px;
    flex: 0 0 auto;
    line-height: normal;
    padding: 5px 8px;
}

/* ==============================================
   OR SEPARATOR
   ============================================== */

.wcasr-shipping-separator-or {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #a7aaad;
}

.wcasr-shipping-separator-or::before,
.wcasr-shipping-separator-or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #dcdcde;
}

/* ==============================================
   ADD GROUP BUTTON
   ============================================== */

#wcasr-shipping-groups-container #add-shipping-group.components-button {
    display: flex;
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
    border-top: 1px dashed #c3c4c7;
    border-radius: 0 0 3px 3px;
    background: transparent;
    color: #2271b1;
    font-size: 13px;
    font-weight: 500;
    height: auto;
    min-height: 0;
}

#wcasr-shipping-groups-container #add-shipping-group.components-button:hover {
    background: #f0f7ff;
    color: #135e96;
}
