/* Woo Branch Inventory – Frontend CSS */

.wbi-branch-stock {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin: 14px 0 18px;
    font-size: 14px;
}

.wbi-branch-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    background: #f9f9f9;
    border-radius: 4px 4px 0 0;
    user-select: none;
    transition: background 0.15s;
}

.wbi-branch-toggle:hover {
    background: #f0f0f0;
}

.wbi-branch-toggle[aria-expanded="true"] .wbi-toggle-icon {
    transform: rotate(180deg);
}

.wbi-toggle-label {
    font-weight: 600;
    color: #333;
}

.wbi-toggle-icon {
    font-size: 18px;
    color: #666;
    line-height: 1;
    transition: transform 0.2s ease;
    display: inline-block;
}

/* List */
.wbi-branch-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wbi-branch-list[hidden] {
    display: none;
}

.wbi-branch-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-top: 1px solid #eee;
    gap: 12px;
}

.wbi-branch-radio {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wbi-branch-radio span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0073aa;
    display: none;
}

.wbi-branch-item.selected .wbi-branch-radio {
    border-color: #0073aa;
}

.wbi-branch-item.selected .wbi-branch-radio span {
    display: block;
}

.wbi-branch-info {
    flex: 1;
    min-width: 0;
}

.wbi-branch-name {
    display: block;
    font-weight: 600;
    color: #222;
}

.wbi-branch-address {
    display: block;
    font-size: 12px;
    color: #777;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wbi-branch-qty {
    flex-shrink: 0;
    color: #2e7d32;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}

/* Badge "Mặc định" */
.wbi-branch-default-badge {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    color: #0073aa;
    background: #e8f4fb;
    border: 1px solid #b3d9f0;
    border-radius: 3px;
    padding: 1px 6px;
    margin-left: 6px;
    white-space: nowrap;
}

/* Focus state cho accessibility */
.wbi-branch-item:focus {
    outline: 2px solid #0073aa;
    outline-offset: -2px;
    border-radius: 2px;
}

.wbi-branch-item {
    cursor: pointer;
    transition: background 0.12s;
}

.wbi-branch-item:hover {
    background: #f5f8ff;
}

.wbi-branch-item.selected {
    background: #f0f7ff;
}
